FFmpegSource2: small fixes

Originally committed to SVN as r2374.
This commit is contained in:
Fredrik Mellbin 2008-09-23 14:58:39 +00:00
parent 9b4f389fb2
commit b013a92923
3 changed files with 5 additions and 9 deletions

View file

@ -67,7 +67,7 @@
#define MAXCLUSTER (64*1048576)
#define MAXFRAME (4*1048576)
#ifdef WIN32
#ifdef _WIN32
#define LL(x) x##i64
#define ULL(x) x##ui64
#else

View file

@ -165,7 +165,7 @@ AVSValue __cdecl CreateFFAudioSource(AVSValue Args, void* UserData, IScriptEnvir
const char *CacheFile = Args[3].AsString("");
if (Track <= -2)
Env->ThrowError("FFAudioSource: No video track selected");
Env->ThrowError("FFAudioSource: No audio track selected");
std::string DefaultCache(Source);
DefaultCache.append(".ffindex");
@ -175,7 +175,7 @@ AVSValue __cdecl CreateFFAudioSource(AVSValue Args, void* UserData, IScriptEnvir
FrameIndex *Index;
if (Cache) {
if (!(Index = FFMS_ReadIndex(CacheFile, ErrorMsg, MsgSize))) {
if (!(Index = FFMS_MakeIndex(Source, -1, NULL, NULL, NULL, ErrorMsg, MsgSize)))
if (!(Index = FFMS_MakeIndex(Source, -1, CacheFile, NULL, NULL, ErrorMsg, MsgSize)))
Env->ThrowError("FFAudioSource: %s", ErrorMsg);
if (Cache)

View file

@ -31,19 +31,15 @@
# define EXTERN_C
#endif
#ifdef WIN32
#ifdef _WIN32
# define FFMS_CC __stdcall
#else
# define FFMS_CC
#endif
#ifdef WIN32
# ifdef FFMS_EXPORTS
# define FFMS_API(ret) EXTERN_C __declspec(dllexport) ret FFMS_CC
# else
# define FFMS_API(ret) EXTERN_C __declspec(dllimport) ret FFMS_CC
# endif
#else
# define FFMS_CC
# define FFMS_API(ret) EXTERN_C ret FFMS_CC
#endif