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 MAXCLUSTER (64*1048576)
#define MAXFRAME (4*1048576) #define MAXFRAME (4*1048576)
#ifdef WIN32 #ifdef _WIN32
#define LL(x) x##i64 #define LL(x) x##i64
#define ULL(x) x##ui64 #define ULL(x) x##ui64
#else #else

View File

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

View File

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