basevideodecoder: Track present position on discont before resetting it
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 11 Jul 2011 10:36:42 +0000 (12:36 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 12 Jul 2011 06:36:01 +0000 (08:36 +0200)
omx/gstbasevideodecoder.c

index 3fd67a1..f2b2a68 100644 (file)
@@ -1250,12 +1250,13 @@ gst_base_video_decoder_chain (GstPad * pad, GstBuffer * buf)
     gint64 ts, index;
 
     GST_DEBUG_OBJECT (base_video_decoder, "received DISCONT buffer");
-    gst_base_video_decoder_flush (base_video_decoder, FALSE);
 
     /* track present position */
     ts = base_video_decoder->timestamp_offset;
     index = base_video_decoder->field_index;
 
+    gst_base_video_decoder_flush (base_video_decoder, FALSE);
+
     /* buffer may claim DISCONT loudly, if it can't tell us where we are now,
      * we'll stick to where we were ...
      * Particularly useful/needed for upstream BYTE based */