mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
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.
This commit is contained in:
parent
7877ffb6f5
commit
4aff3e48be
1 changed files with 12 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue