diff --git a/aegisub/src/audio_provider_ffmpegsource.cpp b/aegisub/src/audio_provider_ffmpegsource.cpp index 50433db62..449aeaf96 100644 --- a/aegisub/src/audio_provider_ffmpegsource.cpp +++ b/aegisub/src/audio_provider_ffmpegsource.cpp @@ -142,7 +142,9 @@ void FFmpegSourceAudioProvider::LoadAudio(Aegisub::String filename) { } // update access time of index file so it won't get cleaned away - wxFileName(CacheName).Touch(); + if (!wxFileName(CacheName).Touch()) { + // warn user? + } // FIXME: provide a way to choose which audio track to load? int TrackNumber = FFMS_GetFirstTrackOfType(Index, FFMS_TYPE_AUDIO, FFMSErrMsg, MsgSize); diff --git a/aegisub/src/ffmpegsource_common.cpp b/aegisub/src/ffmpegsource_common.cpp index f2be3f12b..26f168718 100644 --- a/aegisub/src/ffmpegsource_common.cpp +++ b/aegisub/src/ffmpegsource_common.cpp @@ -95,7 +95,7 @@ FFIndex *FFmpegSourceProvider::DoIndexing(FFIndex *Index, wxString FileNameWX, w // write index to disk for later use // ignore write errors for now - FFMS_WriteIndex(CacheName.char_str(), Index, FFMSErrMsg, MsgSize); + FFMS_WriteIndex(CacheName.utf8_str(), Index, FFMSErrMsg, MsgSize); /*if (FFMS_WriteIndex(CacheName.char_str(), Index, FFMSErrMsg, MsgSize)) { wxString temp(FFMSErrMsg, wxConvUTF8); MsgString << _T("Failed to write index: ") << temp; diff --git a/aegisub/src/ffmpegsource_common.h b/aegisub/src/ffmpegsource_common.h index 80d4f9fcf..a45da469f 100644 --- a/aegisub/src/ffmpegsource_common.h +++ b/aegisub/src/ffmpegsource_common.h @@ -41,6 +41,7 @@ #include #include #include "include/aegisub/aegisub.h" +#define FFMS_BETA_10_COMPAT #include #include "dialog_progress.h" diff --git a/aegisub/src/video_provider_ffmpegsource.cpp b/aegisub/src/video_provider_ffmpegsource.cpp index 18e80d8c6..4256ab775 100644 --- a/aegisub/src/video_provider_ffmpegsource.cpp +++ b/aegisub/src/video_provider_ffmpegsource.cpp @@ -137,7 +137,10 @@ void FFmpegSourceVideoProvider::LoadVideo(Aegisub::String filename, double fps) } // update access time of index file so it won't get cleaned away - wxFileName(CacheName).Touch(); + if (!wxFileName(CacheName).Touch()) { + // warn user? + // FIND OUT WHY IT'S POPPING UP ERROR MESSAGES HERE + } // we have now read the index and may proceed with cleaning the index cache if (!CleanCache()) {