forked from mia/Aegisub
Fix leak of the Indexer when an audio/video file has already been indexed
Originally committed to SVN as r6940.
This commit is contained in:
parent
11a4ede9a0
commit
b2fb39b67f
2 changed files with 6 additions and 0 deletions
|
@ -143,6 +143,9 @@ void FFmpegSourceAudioProvider::LoadAudio(wxString filename) {
|
|||
if (TrackNumber == FFMS_TRACKMASK_ALL)
|
||||
TrackNumber = FFMS_GetFirstTrackOfType(Index, FFMS_TYPE_AUDIO, &ErrInfo);
|
||||
}
|
||||
else {
|
||||
FFMS_CancelIndexing(Indexer);
|
||||
}
|
||||
|
||||
// update access time of index file so it won't get cleaned away
|
||||
if (!wxFileName(CacheName).Touch()) {
|
||||
|
|
|
@ -132,6 +132,9 @@ void FFmpegSourceVideoProvider::LoadVideo(wxString filename) {
|
|||
TrackMask = FFMS_TRACKMASK_ALL;
|
||||
Index = DoIndexing(Indexer, CacheName, TrackMask, GetErrorHandlingMode());
|
||||
}
|
||||
else {
|
||||
FFMS_CancelIndexing(Indexer);
|
||||
}
|
||||
|
||||
// update access time of index file so it won't get cleaned away
|
||||
wxFileName(CacheName).Touch();
|
||||
|
|
Loading…
Reference in a new issue