videodecoder: Only keep track of timestamps if the subclass is parsing data
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 10 Dec 2012 11:49:46 +0000 (11:49 +0000)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 10 Dec 2012 11:51:02 +0000 (11:51 +0000)
Otherwise we just pass through the timestamps directly and don't
need to waste additional memory for them.

Fixes bug #689814.

gst-libs/gst/video/gstvideodecoder.c

index 3481ebc..27f2e2b 100644 (file)
@@ -1678,7 +1678,7 @@ gst_video_decoder_chain_forward (GstVideoDecoder * decoder,
   if (priv->current_frame == NULL)
     priv->current_frame = gst_video_decoder_new_frame (decoder);
 
-  if (GST_BUFFER_PTS_IS_VALID (buf)) {
+  if (GST_BUFFER_PTS_IS_VALID (buf) && !priv->packetized) {
     gst_video_decoder_add_timestamp (decoder, buf);
   }
   priv->input_offset += gst_buffer_get_size (buf);