[Bug 729760] appsrc: Changing caps and pushing buffers is not serialized
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Fri Aug 1 05:40:58 PDT 2014
https://bugzilla.gnome.org/show_bug.cgi?id=729760
GStreamer | gst-plugins-base | git
Sebastian Dröge (slomo) <slomo> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #282124|none |needs-work
status| |
--- Comment #17 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2014-08-01 12:40:55 UTC ---
Review of attachment 282124:
--> (https://bugzilla.gnome.org/review?bug=729760&attachment=282124)
::: gst-libs/gst/app/gstappsrc.c
@@ +537,3 @@
+ while ((caps_or_buffer = g_queue_pop_head (priv->queue))) {
+ if (caps_or_buffer) {
+ gst_mini_object_unref (caps_or_buffer);
Can it ever be NULL?
@@ +1088,2 @@
/* Contiue checks caps and queue */
continue;
Here I was more thinking about a symmetric loop instead of this
while (!g_queue_is_empty (priv->queue)) {
obj = g_queue_pop_head (priv->queue);
if (GST_IS_CAPS (obj)) {
caps = GST_CAPS (obj);
negotiate and stuff
} else if (GST_IS_BUFFER (obj)) {
buffer = GST_BUFFER (obj);
push buffer downstream and everything
}
gst_mini_object_unref (obj);
}
@@ +1190,3 @@
GST_DEBUG_OBJECT (appsrc, "setting caps to %" GST_PTR_FORMAT, caps);
+
+ caps_or_buffer = g_queue_peek_tail (priv->queue);
Why this complicated code? Just push the caps on the queue and handle them
above :)
@@ +1251,3 @@
+ if ((caps = appsrc->priv->last_caps))
+ gst_caps_ref (caps);
+ GST_OBJECT_UNLOCK (appsrc);
Is the caps query now returning current_caps, while the caps property returns
the last caps?
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the gstreamer-bugs
mailing list