diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-06-05 13:47:15 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-06-05 13:47:15 +0200 |
commit | 608a920771e698d5a43f8c4f800e57173a9165e8 (patch) | |
tree | 2104816853f2a48bf282a19c842de2283d80ae53 | |
parent | cfbb046f1e73e5b27c3436120660f27bacc7d6c4 (diff) |
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
-rw-r--r-- | ext/ffmpeg/gstffmpegdec.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c index 45052f5..485ff64 100644 --- a/ext/ffmpeg/gstffmpegdec.c +++ b/ext/ffmpeg/gstffmpegdec.c @@ -1257,10 +1257,14 @@ gst_ffmpegdec_do_qos (GstFFMpegDec * ffmpegdec, GstClockTime timestamp, 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, 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 * values mean we are early, positive values mean we are too late. */ diff = GST_CLOCK_DIFF (qostime, earliest_time); |