[Bug 710268] New: GstBaseTransform cannot answer GST_QUERY_ALLOCATION if its src has ANY caps

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Oct 16 15:14:00 CEST 2013


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

           Summary: GstBaseTransform cannot answer GST_QUERY_ALLOCATION if
                    its src has ANY caps
    Classification: Platform
           Product: GStreamer
           Version: 1.0.7
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: krothwell at espial.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


In gst_base_src_default_negotiate(), if gst_caps_is_any() goto no_nego_needed,
which means that gst_base_src_set_caps is never called and no GST_EVENT_CAPS is
emitted from the src element.

In gst_base_transform_default_query(), when answering GST_QUERY_ALLOCATION, if
!priv->negotiated, "not negotiated yet, can't answer ALLOCATION query".  

priv->negotiated only gets set in response to a GST_EVENT_CAPS, so for some
pipelines the transform element is unable to query further downstream with
GST_QUERY_ALLOCATION and instead allocates buffers itself.  For downstream
elements, most notably decoders, that require the use of a specific
GstAllocator this means some pipelines fail.

For example, assuming myaudiodecoder has a GstAllocator and cannot receive
GstBuffers allocated by the default allocator:

 gst-launch-1.0 filesrc location=/usr/test.mp3 ! myaudiodecoder ! myaudiosink

works, i.e. filesrc allocates buffers using an allocator assigned by
myaudiodecoder, but


 gst-launch-1.0 filesrc location=/usr/test.mp3 ! identity ! myaudiodecoder !
myaudiosink

fails because the 'identity' element (base class GstBaseTransform) fails to
forward the GST_QUERY_ALLOCATION from filesrc (base class GstBaseSrc) to
myaudiodecoder because filesrc never emitted a GST_EVENT_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.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list