ffmpegdec: do not store timestamp for buffer that will be skipped
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 19 Feb 2010 19:33:06 +0000 (20:33 +0100)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Fri, 19 Feb 2010 19:33:06 +0000 (20:33 +0100)
Fixes #610481.

ext/ffmpeg/gstffmpegdec.c

index 0b3e92e..80bb52d 100644 (file)
@@ -2441,9 +2441,6 @@ gst_ffmpegdec_chain (GstPad * pad, GstBuffer * inbuf)
    * interpollation can work. */
   ffmpegdec->clear_ts = TRUE;
 
-  /* append the unaltered buffer timestamp to list */
-  gst_ts_handler_append (ffmpegdec, inbuf);
-
   oclass = (GstFFMpegDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
 
   /* do early keyframe check pretty bad to rely on the keyframe flag in the
@@ -2458,6 +2455,9 @@ gst_ffmpegdec_chain (GstPad * pad, GstBuffer * inbuf)
     ffmpegdec->waiting_for_key = FALSE;
   }
 
+  /* append the unaltered buffer timestamp to list */
+  gst_ts_handler_append (ffmpegdec, inbuf);
+
   in_timestamp = GST_BUFFER_TIMESTAMP (inbuf);
   in_duration = GST_BUFFER_DURATION (inbuf);
   in_offset = GST_BUFFER_OFFSET (inbuf);