[Bug 754597] appsrc fails to push the caps at the start of the data flow when configured in seekable/random-access mode

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Sep 8 00:04:10 PDT 2015


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

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

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

--- Comment #10 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 310868:
 --> (https://bugzilla.gnome.org/review?bug=754597&attachment=310868)

Looks mostly good, thanks :) Can you update the patch?

::: gst-libs/gst/app/gstappsrc.c
@@ +573,3 @@
     if (obj) {
+      if (GST_IS_CAPS (obj) && retain_last_caps &&
+          priv->last_caps == GST_CAPS (obj)) {

This condition seems a bit weird. You basically want to remember the caps that
are closest to the tail of the queue... so why not

if (GST_IS_CAPS (obj) && retain_last_caps) {
  gst_caps_replace (&requeue_caps, GST_CAPS_CAST (obj));
} else {
  gst_mini_object_unref (obj);
}

You also would need to use the object lock if you want to use the last_caps
field, and in theory I think last_caps could be queued up multiple times... in
which case your code would leak references.

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