ffdec: be more careful with DTS timestamp interpolation

Don't use -1 and 0 duration buffers to calculate next output timestamp as they
are very likely wrong.

Fixes #632877
This commit is contained in:
Wim Taymans 2010-10-22 12:59:02 +02:00
parent 07ce1d1906
commit cc2a6e493b

View file

@ -1903,8 +1903,10 @@ gst_ffmpegdec_video_frame (GstFFMpegDec * ffmpegdec,
}
GST_BUFFER_DURATION (*outbuf) = out_duration;
if (out_timestamp != -1 && out_duration != -1)
if (out_timestamp != -1 && out_duration != -1 && out_duration != 0)
ffmpegdec->next_out = out_timestamp + out_duration;
else
ffmpegdec->next_out = -1;
/* palette is not part of raw video frame in gst and the size
* of the outgoing buffer needs to be adjusted accordingly */