[Bug 730053] baseparse: allow skipping more data than currently available

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon May 19 03:20:44 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=730053
  GStreamer | gstreamer (core) | git

Sebastian Dröge (slomo) <slomo> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #276753|none                        |needs-work
             status|                            |

--- Comment #3 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2014-05-19 10:20:38 UTC ---
Review of attachment 276753:
 --> (https://bugzilla.gnome.org/review?bug=730053&attachment=276753)

No, that's ok

::: libs/gst/base/gstbaseparse.c
@@ +355,3 @@
+
+  /* When we need to skip more data than we have currently */
+  gint skip;

This could be guint, right? You use 0 for unset anyway

@@ +1995,3 @@
+      /* If we're asked to skip more than is available in the adapter,
+         we need to remember what we need to skip for next iteration */
+      gint av = gst_adapter_available (parse->priv->adapter);

This returns a gsize

@@ +2001,3 @@
+      } else {
+        GST_DEBUG
+            ("This is more than available, flyshing %u, storing %u to skip",
av,

%u is "unsigned int" aka guint. gsize would be G_GSIZE_FORMAT, for signed "int"
use %d

@@ +2748,3 @@
+    gsize bsize = gst_buffer_get_size (buffer);
+    GST_DEBUG ("Got %u buffer, need to skip %u", (unsigned) bsize,
+        (unsigned) parse->priv->skip);

Same story here

@@ +2760,3 @@
+    parse->priv->offset += parse->priv->skip;
+    GST_DEBUG ("Done eating, we have %u left on this buffer",
+        (unsigned) gst_buffer_get_size (buffer));

And here

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list