vdpaumpegdec: don't send the EVENT_NEWSEGMENT downstream if we're seeking
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>
Fri, 5 Jun 2009 15:53:16 +0000 (17:53 +0200)
committerJan Schmidt <thaytan@noraisin.net>
Sat, 20 Jun 2009 14:21:42 +0000 (15:21 +0100)
sys/vdpau/gstvdpmpegdecoder.c

index b6964175154ab938d338f494e641a1b9d75bc397..db01527d921e1e3ee260215535a992d2aed4da93 100644 (file)
@@ -893,8 +893,15 @@ gst_vdp_mpeg_decoder_sink_event (GstPad * pad, GstEvent * event)
             stop, position);
       }
 
+      /* if we seek ourselves we don't push out a newsegment now since we
+       * use the calculated timestamp of the first frame for this */
+      if (mpeg_dec->seeking) {
+        gst_event_unref (event);
+        return TRUE;
+      }
+
     convert_error:
-      gst_pad_push_event (mpeg_dec->src, event);
+      res = gst_pad_push_event (mpeg_dec->src, event);
 
       break;
     }