diff --git a/FFmpegSource2/MatroskaParser.c b/FFmpegSource2/MatroskaParser.c index fd84a2ef8..0e0927fb9 100644 --- a/FFmpegSource2/MatroskaParser.c +++ b/FFmpegSource2/MatroskaParser.c @@ -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 diff --git a/FFmpegSource2/ffavsfilters.cpp b/FFmpegSource2/ffavsfilters.cpp index 63da69b17..db33247df 100644 --- a/FFmpegSource2/ffavsfilters.cpp +++ b/FFmpegSource2/ffavsfilters.cpp @@ -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) diff --git a/FFmpegSource2/ffms.h b/FFmpegSource2/ffms.h index c56e544c3..56b372e74 100644 --- a/FFmpegSource2/ffms.h +++ b/FFmpegSource2/ffms.h @@ -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