You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Prevent seeking past end of stream, which causes a huge # of Seeks once EOF is reached, if we try and request frame #s too large for the file
This commit is contained in:
@@ -1773,6 +1773,10 @@ void FFmpegReader::Seek(int64_t requested_frame) {
|
||||
requested_frame = 1;
|
||||
if (requested_frame > info.video_length)
|
||||
requested_frame = info.video_length;
|
||||
if (requested_frame > largest_frame_processed && packet_status.end_of_file) {
|
||||
// Not possible to search past largest_frame once EOF is reached (no more packets)
|
||||
return;
|
||||
}
|
||||
|
||||
// Debug output
|
||||
ZmqLogger::Instance()->AppendDebugMethod("FFmpegReader::Seek",
|
||||
|
||||
Reference in New Issue
Block a user