Fix reindexing of files on every open

FFMS_IndexBelongsToFile returns 0 when the index belongs to the file,
not 1.

Originally committed to SVN as r6526.
This commit is contained in:
Thomas Goyne 2012-02-29 01:24:16 +00:00
parent d53bb22d2b
commit af58db5b9e
2 changed files with 2 additions and 2 deletions

View File

@ -100,7 +100,7 @@ void FFmpegSourceAudioProvider::LoadAudio(wxString filename) {
agi::scoped_holder<FFMS_Index*, void (FFMS_CC*)(FFMS_Index*)>
Index(FFMS_ReadIndex(CacheName.utf8_str(), &ErrInfo), FFMS_DestroyIndex);
if (Index && !FFMS_IndexBelongsToFile(Index, FileNameShort.utf8_str(), &ErrInfo))
if (Index && FFMS_IndexBelongsToFile(Index, FileNameShort.utf8_str(), &ErrInfo))
Index = NULL;
// index valid but track number still not set?

View File

@ -113,7 +113,7 @@ void FFmpegSourceVideoProvider::LoadVideo(wxString filename) {
agi::scoped_holder<FFMS_Index*, void (FFMS_CC*)(FFMS_Index*)>
Index(FFMS_ReadIndex(CacheName.utf8_str(), &ErrInfo), FFMS_DestroyIndex);
if (Index && !FFMS_IndexBelongsToFile(Index, FileNameShort.utf8_str(), &ErrInfo))
if (Index && FFMS_IndexBelongsToFile(Index, FileNameShort.utf8_str(), &ErrInfo))
Index = NULL;
// time to examine the index and check if the track we want is indexed