When a seek fails, disable seeking with FFmpegReader. This fixes lots of issues with image sequences, but needs more testing to see if it causes issues with normal video files.

This commit is contained in:
Jonathan Thomas
2016-03-08 23:11:56 -06:00
parent ac774b4e3b
commit 38b7516b50

View File

@@ -1304,6 +1304,14 @@ void FFmpegReader::Seek(long int requested_frame) throw(TooManySeeks)
is_seeking = false;
seeking_pts = 0;
seeking_frame = 0;
// dislable seeking for this reader (since it failed)
// TODO: Find a safer way to do this... not sure how common it is for a seek to fail.
enable_seek = false;
// Close and re-open file (basically seeking to frame 1)
Close();
Open();
}
}
}