videodecoder: Don't give out bogus frame deadlines

Make sure the frame deadline was set before calculating the
max_decode_time. Fixes problems with ffmpeg skipping frames when
it doesn't need to, when the input doesn't have full timestamping
(divx in avi)
This commit is contained in:
Jan Schmidt 2012-06-20 03:45:14 +10:00
parent 9a79a145b1
commit b7759a4d42

View file

@ -2853,7 +2853,8 @@ gst_video_decoder_get_max_decode_time (GstVideoDecoder *
GST_OBJECT_LOCK (decoder);
earliest_time = decoder->priv->earliest_time;
if (GST_CLOCK_TIME_IS_VALID (earliest_time))
if (GST_CLOCK_TIME_IS_VALID (earliest_time)
&& GST_CLOCK_TIME_IS_VALID (frame->deadline))
deadline = GST_CLOCK_DIFF (earliest_time, frame->deadline);
else
deadline = G_MAXINT64;