isomp4: Try to seek upstream before processing seek push event
authorDavid Corvoysier <david.corvoysier@orange.com>
Thu, 28 Jun 2012 09:29:55 +0000 (11:29 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Thu, 28 Jun 2012 12:44:58 +0000 (14:44 +0200)
When it receives a seek in push mode, the qtdemux should first try to push the event upstream, and only if upstream fails fall back to
its own seek logic.

gst/isomp4/qtdemux.c

index 7a80c52c45203035cc9d52dda2e51906aa5d3279..3e6a7b3b91d924b0dcd2eab7da8508704e376ed8 100644 (file)
@@ -1488,8 +1488,11 @@ gst_qtdemux_handle_src_event (GstPad * pad, GstObject * parent,
     }
       if (qtdemux->pullbased) {
         res = gst_qtdemux_do_seek (qtdemux, pad, event);
-      } else if (qtdemux->state == QTDEMUX_STATE_MOVIE && qtdemux->n_streams &&
-          !qtdemux->fragmented) {
+      } else if (gst_pad_push_event (qtdemux->sinkpad, gst_event_ref (event))) {
+        GST_DEBUG_OBJECT (qtdemux, "Upstream successfully seeked");
+        res = TRUE;
+      } else if (qtdemux->state == QTDEMUX_STATE_MOVIE && qtdemux->n_streams
+          && !qtdemux->fragmented) {
         res = gst_qtdemux_do_push_seek (qtdemux, pad, event);
       } else {
         GST_DEBUG_OBJECT (qtdemux,