Changes required to compile because of the previous commit
Originally committed to SVN as r2992.
This commit is contained in:
parent
841150b2b7
commit
ea80b6c130
2 changed files with 7 additions and 7 deletions
|
@ -101,7 +101,7 @@ void FFmpegSourceAudioProvider::LoadAudio(Aegisub::String filename) {
|
||||||
// index exists, but does it have indexing info for the audio track(s)?
|
// index exists, but does it have indexing info for the audio track(s)?
|
||||||
int NumTracks = FFMS_GetNumTracks(Index);
|
int NumTracks = FFMS_GetNumTracks(Index);
|
||||||
if (NumTracks <= 0) {
|
if (NumTracks <= 0) {
|
||||||
FFMS_DestroyFFIndex(Index);
|
FFMS_DestroyIndex(Index);
|
||||||
Index = NULL;
|
Index = NULL;
|
||||||
throw _T("FFmpegSource audio provider: no tracks found in index file");
|
throw _T("FFmpegSource audio provider: no tracks found in index file");
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ void FFmpegSourceAudioProvider::LoadAudio(Aegisub::String filename) {
|
||||||
for (int i = 0; i < NumTracks; i++) {
|
for (int i = 0; i < NumTracks; i++) {
|
||||||
FFTrack *FrameData = FFMS_GetTrackFromIndex(Index, i);
|
FFTrack *FrameData = FFMS_GetTrackFromIndex(Index, i);
|
||||||
if (FrameData == NULL) {
|
if (FrameData == NULL) {
|
||||||
FFMS_DestroyFFIndex(Index);
|
FFMS_DestroyIndex(Index);
|
||||||
Index = NULL;
|
Index = NULL;
|
||||||
wxString temp(FFMSErrMsg, wxConvUTF8);
|
wxString temp(FFMSErrMsg, wxConvUTF8);
|
||||||
MsgString << _T("Couldn't get track data: ") << temp;
|
MsgString << _T("Couldn't get track data: ") << temp;
|
||||||
|
@ -120,7 +120,7 @@ void FFmpegSourceAudioProvider::LoadAudio(Aegisub::String filename) {
|
||||||
if (FFMS_GetNumFrames(FrameData) <= 0 && (FFMS_GetTrackType(FrameData) == FFMS_TYPE_AUDIO)) {
|
if (FFMS_GetNumFrames(FrameData) <= 0 && (FFMS_GetTrackType(FrameData) == FFMS_TYPE_AUDIO)) {
|
||||||
// found an unindexed audio track, we'll need to reindex
|
// found an unindexed audio track, we'll need to reindex
|
||||||
try {
|
try {
|
||||||
FFMS_DestroyFFIndex(Index);
|
FFMS_DestroyIndex(Index);
|
||||||
Index = NULL;
|
Index = NULL;
|
||||||
Index = DoIndexing(Index, FileNameWX, CacheName, FFMSTrackMaskAll, false);
|
Index = DoIndexing(Index, FileNameWX, CacheName, FFMSTrackMaskAll, false);
|
||||||
} catch (wxString temp) {
|
} catch (wxString temp) {
|
||||||
|
@ -142,7 +142,7 @@ void FFmpegSourceAudioProvider::LoadAudio(Aegisub::String filename) {
|
||||||
// FIXME: provide a way to choose which audio track to load?
|
// FIXME: provide a way to choose which audio track to load?
|
||||||
int TrackNumber = FFMS_GetFirstTrackOfType(Index, FFMS_TYPE_AUDIO, FFMSErrMsg, MsgSize);
|
int TrackNumber = FFMS_GetFirstTrackOfType(Index, FFMS_TYPE_AUDIO, FFMSErrMsg, MsgSize);
|
||||||
if (TrackNumber < 0) {
|
if (TrackNumber < 0) {
|
||||||
FFMS_DestroyFFIndex(Index);
|
FFMS_DestroyIndex(Index);
|
||||||
Index = NULL;
|
Index = NULL;
|
||||||
wxString temp(FFMSErrMsg, wxConvUTF8);
|
wxString temp(FFMSErrMsg, wxConvUTF8);
|
||||||
MsgString << _T("Couldn't find any audio tracks: ") << temp;
|
MsgString << _T("Couldn't find any audio tracks: ") << temp;
|
||||||
|
@ -150,7 +150,7 @@ void FFmpegSourceAudioProvider::LoadAudio(Aegisub::String filename) {
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioSource = FFMS_CreateAudioSource(FileNameWX.mb_str(wxConvLocal), TrackNumber, Index, FFMSErrMsg, MsgSize);
|
AudioSource = FFMS_CreateAudioSource(FileNameWX.mb_str(wxConvLocal), TrackNumber, Index, FFMSErrMsg, MsgSize);
|
||||||
FFMS_DestroyFFIndex(Index);
|
FFMS_DestroyIndex(Index);
|
||||||
Index = NULL;
|
Index = NULL;
|
||||||
if (!AudioSource) {
|
if (!AudioSource) {
|
||||||
wxString temp(FFMSErrMsg, wxConvUTF8);
|
wxString temp(FFMSErrMsg, wxConvUTF8);
|
||||||
|
|
|
@ -148,7 +148,7 @@ void FFmpegSourceVideoProvider::LoadVideo(Aegisub::String filename, double fps)
|
||||||
// FIXME: provide a way to choose which audio track to load?
|
// FIXME: provide a way to choose which audio track to load?
|
||||||
int TrackNumber = FFMS_GetFirstTrackOfType(Index, FFMS_TYPE_VIDEO, FFMSErrorMessage, MessageSize);
|
int TrackNumber = FFMS_GetFirstTrackOfType(Index, FFMS_TYPE_VIDEO, FFMSErrorMessage, MessageSize);
|
||||||
if (TrackNumber < 0) {
|
if (TrackNumber < 0) {
|
||||||
FFMS_DestroyFFIndex(Index);
|
FFMS_DestroyIndex(Index);
|
||||||
Index = NULL;
|
Index = NULL;
|
||||||
wxString temp(FFMSErrorMessage, wxConvUTF8);
|
wxString temp(FFMSErrorMessage, wxConvUTF8);
|
||||||
ErrorMsg << _T("Couldn't find any video tracks: ") << temp;
|
ErrorMsg << _T("Couldn't find any video tracks: ") << temp;
|
||||||
|
@ -156,7 +156,7 @@ void FFmpegSourceVideoProvider::LoadVideo(Aegisub::String filename, double fps)
|
||||||
}
|
}
|
||||||
|
|
||||||
VideoSource = FFMS_CreateVideoSource(FileNameWX.mb_str(wxConvLocal), TrackNumber, Index, "", Threads, SeekMode, FFMSErrorMessage, MessageSize);
|
VideoSource = FFMS_CreateVideoSource(FileNameWX.mb_str(wxConvLocal), TrackNumber, Index, "", Threads, SeekMode, FFMSErrorMessage, MessageSize);
|
||||||
FFMS_DestroyFFIndex(Index);
|
FFMS_DestroyIndex(Index);
|
||||||
Index = NULL;
|
Index = NULL;
|
||||||
if (VideoSource == NULL) {
|
if (VideoSource == NULL) {
|
||||||
wxString temp(FFMSErrorMessage, wxConvUTF8);
|
wxString temp(FFMSErrorMessage, wxConvUTF8);
|
||||||
|
|
Loading…
Reference in a new issue