From 8dee6f815f2b8f8fdfa9006381832b3cf71b33dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 28 Feb 2017 15:47:23 +0200 Subject: [PATCH] avidemux: Don't increment -1 / unset indices CID 1398545 --- gst/avi/gstavidemux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index 3e21dbd5d8..837dbb5e97 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -2646,7 +2646,7 @@ gst_avi_demux_index_for_time (GstAviDemux * avi, index = avi_stream_convert_time_to_frames_unchecked (stream, time); /* this entry typically undershoots the target time, * so check a bit more if next needed */ - if (next) { + if (next && index != -1) { GstClockTime itime = avi_stream_convert_frames_to_time_unchecked (stream, index); if (itime < time && index + 1 < stream->idx_n)