From 179fd4caa715d452509fbc8e641a2889cba0b3d0 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Sun, 28 Dec 2008 03:07:40 +0000 Subject: [PATCH] Fix mac build, add c_str() to filename and include aegisub.h. Originally committed to SVN as r2537. --- aegisub/audio_provider_ffmpegsource.cpp | 5 +++-- aegisub/video_provider_ffmpegsource.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/aegisub/audio_provider_ffmpegsource.cpp b/aegisub/audio_provider_ffmpegsource.cpp index 5ff946db6..baa18bb73 100644 --- a/aegisub/audio_provider_ffmpegsource.cpp +++ b/aegisub/audio_provider_ffmpegsource.cpp @@ -37,6 +37,7 @@ /////////// // Headers +#include "include/aegisub/aegisub.h" #include "audio_provider_ffmpegsource.h" @@ -69,7 +70,7 @@ void FFmpegSourceAudioProvider::LoadAudio(Aegisub::String filename) { wxString FileNameWX(filename.c_str(), wxConvFile); // generate a default name for the cache file - wxString CacheName = GetCacheFilename(filename); + wxString CacheName = GetCacheFilename(filename.c_str()); FrameIndex *Index; Index = FFMS_ReadIndex(CacheName.char_str(), FFMSErrMsg, MsgSize); @@ -184,4 +185,4 @@ void FFmpegSourceAudioProvider::GetAudio(void *Buf, int64_t Start, int64_t Count } -#endif /* WITH_FFMPEGSOURCE */ \ No newline at end of file +#endif /* WITH_FFMPEGSOURCE */ diff --git a/aegisub/video_provider_ffmpegsource.cpp b/aegisub/video_provider_ffmpegsource.cpp index 823292af6..8be509c82 100644 --- a/aegisub/video_provider_ffmpegsource.cpp +++ b/aegisub/video_provider_ffmpegsource.cpp @@ -37,6 +37,7 @@ /////////// // Headers +#include "include/aegisub/aegisub.h" #include "video_provider_ffmpegsource.h" #include "video_context.h" #include "options.h" @@ -83,7 +84,7 @@ void FFmpegSourceVideoProvider::LoadVideo(Aegisub::String filename, double fps) wxString FileNameWX = wxFileName(wxString(filename.c_str(), wxConvFile)).GetShortPath(); // generate a name for the cache file - wxString CacheName = GetCacheFilename(filename); + wxString CacheName = GetCacheFilename(filename.c_str()); // try to read index Index = FFMS_ReadIndex(CacheName.char_str(), FFMSErrorMessage, MessageSize);