FFMS2: Another small typo after all the changes

Originally committed to SVN as r2957.
This commit is contained in:
Fredrik Mellbin 2009-05-20 22:40:55 +00:00
parent 9d636c3cfb
commit 3d2ad9525a

View file

@ -177,7 +177,7 @@ int FFIndex::ReadIndex(const char *IndexFile, char *ErrorMsg, unsigned MsgSize)
if (!Index.is_open()) { if (!Index.is_open()) {
_snprintf(ErrorMsg, MsgSize, "Failed to open '%s' for reading", IndexFile); _snprintf(ErrorMsg, MsgSize, "Failed to open '%s' for reading", IndexFile);
return NULL; return 1;
} }
// Read the index file header // Read the index file header
@ -185,19 +185,19 @@ int FFIndex::ReadIndex(const char *IndexFile, char *ErrorMsg, unsigned MsgSize)
Index.read(reinterpret_cast<char *>(&IH), sizeof(IH)); Index.read(reinterpret_cast<char *>(&IH), sizeof(IH));
if (IH.Id != INDEXID) { if (IH.Id != INDEXID) {
_snprintf(ErrorMsg, MsgSize, "'%s' is not a valid index file", IndexFile); _snprintf(ErrorMsg, MsgSize, "'%s' is not a valid index file", IndexFile);
return NULL; return 2;
} }
if (IH.Version != INDEXVERSION) { if (IH.Version != INDEXVERSION) {
_snprintf(ErrorMsg, MsgSize, "'%s' is not the expected index version", IndexFile); _snprintf(ErrorMsg, MsgSize, "'%s' is not the expected index version", IndexFile);
return NULL; return 3;
} }
if (IH.LAVUVersion != LIBAVUTIL_VERSION_INT || IH.LAVFVersion != LIBAVFORMAT_VERSION_INT || if (IH.LAVUVersion != LIBAVUTIL_VERSION_INT || IH.LAVFVersion != LIBAVFORMAT_VERSION_INT ||
IH.LAVCVersion != LIBAVCODEC_VERSION_INT || IH.LSWSVersion != LIBSWSCALE_VERSION_INT || IH.LAVCVersion != LIBAVCODEC_VERSION_INT || IH.LSWSVersion != LIBSWSCALE_VERSION_INT ||
IH.LPPVersion != LIBPOSTPROC_VERSION_INT) { IH.LPPVersion != LIBPOSTPROC_VERSION_INT) {
_snprintf(ErrorMsg, MsgSize, "A different FFmpeg build was used to create this index", IndexFile); _snprintf(ErrorMsg, MsgSize, "A different FFmpeg build was used to create this index", IndexFile);
return NULL; return 4;
} }
try { try {
@ -224,8 +224,10 @@ int FFIndex::ReadIndex(const char *IndexFile, char *ErrorMsg, unsigned MsgSize)
} catch (...) { } catch (...) {
_snprintf(ErrorMsg, MsgSize, "Unknown error while reading index information in '%s'", IndexFile); _snprintf(ErrorMsg, MsgSize, "Unknown error while reading index information in '%s'", IndexFile);
return 1; return 5;
} }
return 0;
} }
int GetCPUFlags() { int GetCPUFlags() {