From 9c04724e136770d6b011e35a5831fe844809a83a Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Wed, 31 Dec 2008 07:22:24 +0000 Subject: [PATCH] Fix conversion to multibyte strings from widechar strings in FFmpegSource providers. (tomman) Originally committed to SVN as r2582. --- aegisub/audio_provider_ffmpegsource.cpp | 2 +- aegisub/ffmpegsource_common.cpp | 2 +- aegisub/video_provider_ffmpegsource.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aegisub/audio_provider_ffmpegsource.cpp b/aegisub/audio_provider_ffmpegsource.cpp index baa18bb73..b35eab4f6 100644 --- a/aegisub/audio_provider_ffmpegsource.cpp +++ b/aegisub/audio_provider_ffmpegsource.cpp @@ -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; diff --git a/aegisub/ffmpegsource_common.cpp b/aegisub/ffmpegsource_common.cpp index 60beb7afa..c45954c8c 100644 --- a/aegisub/ffmpegsource_common.cpp +++ b/aegisub/ffmpegsource_common.cpp @@ -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); diff --git a/aegisub/video_provider_ffmpegsource.cpp b/aegisub/video_provider_ffmpegsource.cpp index 8be509c82..d22e6ba9e 100644 --- a/aegisub/video_provider_ffmpegsource.cpp +++ b/aegisub/video_provider_ffmpegsource.cpp @@ -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;