From dd40d99710209435b34dc33839bbcced6d8b70a7 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Thu, 13 Nov 2014 14:53:59 +0000 Subject: [PATCH] baseparse: jump over large skips in pull mode 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index fec1af8..acbb517 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -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 */ -- 2.7.4