Commit 4aff3e48 authored by Robert Swain's avatar Robert Swain Committed by Tim-Philipp Müller
Browse files

qtdemux: temporary safety check to avoid crashes with a certain file

Add temporary check to avoid crashes with a certain file when seeking
until the real cause of this is figured out. See #609405.
parent 7877ffb6
......@@ -1538,6 +1538,18 @@ gst_qtdemux_handle_sink_event (GstPad * sinkpad, GstEvent * event)
"applied rate %g, format %d, start %" GST_TIME_FORMAT ", "
"stop %" GST_TIME_FORMAT, update, rate, arate, GST_FORMAT_TIME,
GST_TIME_ARGS (start), GST_TIME_ARGS (stop));
/* FIXME: workaround/safety check for broken files (don't want to end
* up with NULL events if stop < start). Figure out real cause of this
* and fix it. */
if (stop < start) {
GST_ELEMENT_ERROR (demux, STREAM, DEMUX,
(_("This file is invalid and cannot be played.")),
("stop %" GST_TIME_FORMAT " < start %" GST_TIME_FORMAT,
GST_TIME_ARGS (stop), GST_TIME_ARGS (start)));
return FALSE;
}
gst_qtdemux_push_event (demux,
gst_event_new_new_segment_full (update, rate, arate, GST_FORMAT_TIME,
start, stop, start));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment