y4mdec: Fix buffer duration

This commit is contained in:
David Schleef 2011-06-26 19:29:24 -07:00
parent d1fe501eb7
commit 3de8284efd

View file

@ -530,7 +530,7 @@ gst_y4m_dec_chain (GstPad * pad, GstBuffer * buffer)
GST_BUFFER_TIMESTAMP (buffer) =
gst_y4m_dec_frames_to_timestamp (y4mdec, y4mdec->frame_index);
GST_BUFFER_DURATION (buffer) =
gst_y4m_dec_frames_to_timestamp (y4mdec, y4mdec->frame_index) -
gst_y4m_dec_frames_to_timestamp (y4mdec, y4mdec->frame_index + 1) -
GST_BUFFER_TIMESTAMP (buffer);
if (y4mdec->interlaced && y4mdec->tff) {
GST_BUFFER_FLAG_SET (buffer, GST_VIDEO_BUFFER_TFF);