mirror of https://github.com/odrling/Aegisub
Fix conversion to multibyte strings from widechar strings in FFmpegSource providers. (tomman)
Originally committed to SVN as r2582.
This commit is contained in:
parent
93002cf4a8
commit
9c04724e13
|
@ -124,7 +124,7 @@ void FFmpegSourceAudioProvider::LoadAudio(Aegisub::String filename) {
|
|||
throw MsgString;
|
||||
}
|
||||
|
||||
AudioSource = FFMS_CreateAudioSource(FileNameWX.char_str(), TrackNumber, Index, FFMSErrMsg, MsgSize);
|
||||
AudioSource = FFMS_CreateAudioSource(FileNameWX.mb_str(wxConvLocal), TrackNumber, Index, FFMSErrMsg, MsgSize);
|
||||
if (!AudioSource) {
|
||||
wxString temp(FFMSErrMsg, wxConvUTF8);
|
||||
MsgString << _T("Failed to open audio track: ") << temp;
|
||||
|
|
|
@ -73,7 +73,7 @@ FrameIndex *FFmpegSourceProvider::DoIndexing(FrameIndex *Index, wxString FileNam
|
|||
Progress.ProgressDialog->SetProgress(0,1);
|
||||
|
||||
// index all audio tracks
|
||||
Index = FFMS_MakeIndex(FileNameWX.char_str(), Trackmask, FFMSTrackMaskNone, NULL, IgnoreDecodeErrors, FFmpegSourceProvider::UpdateIndexingProgress, &Progress, FFMSErrMsg, MsgSize);
|
||||
Index = FFMS_MakeIndex(FileNameWX.mb_str(wxConvLocal), Trackmask, FFMSTrackMaskNone, NULL, IgnoreDecodeErrors, FFmpegSourceProvider::UpdateIndexingProgress, &Progress, FFMSErrMsg, MsgSize);
|
||||
if (!Index) {
|
||||
Progress.ProgressDialog->Destroy();
|
||||
wxString temp(FFMSErrMsg, wxConvUTF8);
|
||||
|
|
|
@ -127,7 +127,7 @@ void FFmpegSourceVideoProvider::LoadVideo(Aegisub::String filename, double fps)
|
|||
throw ErrorMsg;
|
||||
}
|
||||
|
||||
VideoSource = FFMS_CreateVideoSource(FileNameWX.char_str(), TrackNumber, Index, "", Threads, SeekMode, FFMSErrorMessage, MessageSize);
|
||||
VideoSource = FFMS_CreateVideoSource(FileNameWX.mb_str(wxConvLocal), TrackNumber, Index, "", Threads, SeekMode, FFMSErrorMessage, MessageSize);
|
||||
if (VideoSource == NULL) {
|
||||
wxString temp(FFMSErrorMessage, wxConvUTF8);
|
||||
ErrorMsg << _T("Failed to open video track: ") << temp;
|
||||
|
|
Loading…
Reference in New Issue