y4mdec: Fix buffer duration
authorDavid Schleef <ds@schleef.org>
Mon, 27 Jun 2011 02:29:24 +0000 (19:29 -0700)
committerDavid Schleef <ds@schleef.org>
Mon, 27 Jun 2011 02:29:55 +0000 (19:29 -0700)
gst/y4m/gsty4mdec.c

index 8065bd3d51dd501659fcffad4f414ef5a8e6e131..e7c3caf42a92fd6174aad52c582a5e1e92e45686 100644 (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);