[Bug 677306] [wavparse] TOC support

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Jun 26 01:38:06 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=677306
  GStreamer | gst-plugins-good | git

Sebastian Dröge <slomo> changed:

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

--- Comment #13 from Sebastian Dröge <slomo at circular-chaos.org> 2012-06-26 08:38:00 UTC ---
Review of attachment 217214:
 --> (https://bugzilla.gnome.org/review?bug=677306&attachment=217214)

::: gst/wavparse/gstwavparse.c
@@ +1157,3 @@
+  GstTocEntry *entry = NULL, *subentry = NULL;
+
+  if (wav->toc) {

Protect this with the GstObject lock, see comment below for more info

@@ +1162,3 @@
+  }
+
+  ncues = GST_READ_UINT32_LE (data);

Also check before this that at least 4 bytes are available

@@ +1211,3 @@
+
+  /* send data as TOC */
+  wav->toc = toc;

Protect access to wav->toc with the GstObject lock (GST_OBJECT_LOCK / _UNLOCK).
Don't hold this lock while calling any GStreamer functions like
gst_pad_push_event(), gst_element_post_message(), etc. but instead get a new
reference of the TOC from inside the locked section and release the new
reference after being done.

@@ +2683,3 @@
+        res = FALSE;
+      }
+      gst_query_set_toc (query, toc, 0);

Protect with the GstObject lock too here

@@ +2717,3 @@
+      gint64 start_pos;
+
+      if (!wavparse->toc) {

And here, but don't call gst_wavparse_perform_seek() while holding the lock

-- 
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