qtdemux: check if the end_time is defined before using it

Avoids sending EOS too soon because of overflow. Can happen on
fragmented mp4 playback.
This commit is contained in:
Thiago Santos 2013-10-25 11:30:36 -03:00 committed by Sebastian Dröge
parent 009f1894ce
commit 02d2ef8e31

View file

@ -3751,7 +3751,8 @@ gst_qtdemux_sync_streams (GstQTDemux * demux)
GST_LOG_OBJECT (demux, "current position: %" GST_TIME_FORMAT
", stream end: %" GST_TIME_FORMAT,
GST_TIME_ARGS (demux->segment.position), GST_TIME_ARGS (end_time));
if (end_time + 2 * GST_SECOND < demux->segment.position) {
if (GST_CLOCK_TIME_IS_VALID (end_time)
&& (end_time + 2 * GST_SECOND < demux->segment.position)) {
GST_DEBUG_OBJECT (demux, "sending EOS for stream %s",
GST_PAD_NAME (stream->pad));
stream->sent_eos = TRUE;