From c806ba8d72c201129b68233d9240aadb9ee2d8fe Mon Sep 17 00:00:00 2001 From: Karl Blomster Date: Sat, 18 Apr 2009 10:54:20 +0000 Subject: [PATCH] "Fix" an issue that would cause the FFMS2 audio provider to crash when fed with a unicode filename/path. The solution involves getting the "short path", no idea if it works on Unix. Fixes bugtracker issues #810 and #808. Originally committed to SVN as r2826. --- aegisub/src/audio_provider_ffmpegsource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aegisub/src/audio_provider_ffmpegsource.cpp b/aegisub/src/audio_provider_ffmpegsource.cpp index ccc310d3b..14df03410 100644 --- a/aegisub/src/audio_provider_ffmpegsource.cpp +++ b/aegisub/src/audio_provider_ffmpegsource.cpp @@ -69,7 +69,7 @@ void FFmpegSourceAudioProvider::LoadAudio(Aegisub::String filename) { // clean up Close(); - wxString FileNameWX(filename.c_str(), wxConvFile); + wxString FileNameWX = wxFileName(wxString(filename.c_str(), wxConvFile)).GetShortPath(); // generate a default name for the cache file wxString CacheName = GetCacheFilename(filename.c_str());