mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
ffmpegdec: don't do QoS on invalid timestamps
When we convert the timestamp to running_time, don't try to do QoS on invalid times. Fixes #580810
This commit is contained in:
parent
cfbb046f1e
commit
608a920771
1 changed files with 5 additions and 1 deletions
|
@ -1257,10 +1257,14 @@ gst_ffmpegdec_do_qos (GstFFMpegDec * ffmpegdec, GstClockTime timestamp,
|
||||||
goto no_qos;
|
goto no_qos;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* qos is done on running time */
|
/* qos is done on running time of the timestamp */
|
||||||
qostime = gst_segment_to_running_time (&ffmpegdec->segment, GST_FORMAT_TIME,
|
qostime = gst_segment_to_running_time (&ffmpegdec->segment, GST_FORMAT_TIME,
|
||||||
timestamp);
|
timestamp);
|
||||||
|
|
||||||
|
/* timestamp can be out of segment, then we don't do QoS */
|
||||||
|
if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (qostime)))
|
||||||
|
goto no_qos;
|
||||||
|
|
||||||
/* see how our next timestamp relates to the latest qos timestamp. negative
|
/* see how our next timestamp relates to the latest qos timestamp. negative
|
||||||
* values mean we are early, positive values mean we are too late. */
|
* values mean we are early, positive values mean we are too late. */
|
||||||
diff = GST_CLOCK_DIFF (qostime, earliest_time);
|
diff = GST_CLOCK_DIFF (qostime, earliest_time);
|
||||||
|
|
Loading…
Reference in a new issue