Fix mac build, add c_str() to filename and include aegisub.h.

Originally committed to SVN as r2537.
This commit is contained in:
Amar Takhar 2008-12-28 03:07:40 +00:00
parent f838d6172d
commit 179fd4caa7
2 changed files with 5 additions and 3 deletions

View File

@ -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 */
#endif /* WITH_FFMPEGSOURCE */

View File

@ -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);