summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2006-06-13 09:54:26 +0000
committerTim-Philipp Müller <tim@centricular.net>2006-06-13 09:54:26 +0000
commita1d0655f73773a0058f692ff0651037f785e8865 (patch)
tree9e9dd05c6ce5069a8760151c2f13e76cf3b271b7 /gst
parent745a950214da35fbf9c433bfc926ad9998a0f92d (diff)
gst/avi/gstavidemux.c: Prevent out of bounds array access when scrubbing towards the end of the file between the last...
Original commit message from CVS: * gst/avi/gstavidemux.c: (gst_avi_demux_handle_seek): Prevent out of bounds array access when scrubbing towards the end of the file between the last index entry and the end. Fixes occasional 'start <= stop' newsegment event assertions when scrubbing in MJPEG files.
Diffstat (limited to 'gst')
-rw-r--r--gst/avi/gstavidemux.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c
index 5d26eac9..392ce79d 100644
--- a/gst/avi/gstavidemux.c
+++ b/gst/avi/gstavidemux.c
@@ -2372,6 +2372,8 @@ gst_avi_demux_handle_seek (GstAviDemux * avi, gboolean update)
GST_WARNING_OBJECT (avi,
"Couldn't find AviIndexEntry for time:%" GST_TIME_FORMAT,
GST_TIME_ARGS (avi->segment.start));
+ if (avi->current_entry >= avi->index_size && avi->index_size > 0)
+ avi->current_entry = avi->index_size - 1;
}
}