baseparse: jump over large skips in pull mode
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 13 Nov 2014 14:53:59 +0000 (14:53 +0000)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 18 Dec 2014 13:11:46 +0000 (13:11 +0000)
This bypasses the dumping of buffers we still have to do in push mode.

https://bugzilla.gnome.org/show_bug.cgi?id=730053

libs/gst/base/gstbaseparse.c

index fec1af8..acbb517 100644 (file)
@@ -3237,6 +3237,12 @@ gst_base_parse_scan_frame (GstBaseParse * parse, GstBaseParseClass * klass)
     if (ret != GST_FLOW_OK)
       break;
 
+    /* If a large amount of data was requested to be skipped, _handle_buffer
+       might have set the priv->skip flag to an extra amount on top of skip.
+       In pull mode, we can just pull from the new offset directly. */
+    parse->priv->offset += parse->priv->skip;
+    parse->priv->skip = 0;
+
     /* something flushed means something happened,
      * and we should bail out of this loop so as not to occupy
      * the task thread indefinitely */