[Bug 751606] New: audiobasesrc, audiobasesink: incorrect ringbuffer refcount when create_ringbuffer returns a non-floating ref
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Sun Jun 28 05:17:28 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=751606
Bug ID: 751606
Summary: audiobasesrc, audiobasesink: incorrect ringbuffer
refcount when create_ringbuffer returns a non-floating
ref
Classification: Platform
Product: GStreamer
Version: unspecified
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gst-plugins-base
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: michal.a.wrobel at gmail.com
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
gst_audio_base_{src,sink}_create_ringbuffer() calls the virtual function
create_ringbuffer() to get a GstAudioRingBuffer, sets its parent to the
GstAudioBase{Src,Sink} and returns a pointer to the ringbuffer without passing
the reference (transfer none).
When create_ringbuffer() virtual function returns a floating ref (which is done
by the default implementation in GstAudio{Src,Sink}), everything is fine, as
the floating ref is consumed by gst_object_ref_sink() in
gst_object_set_parent() and the "unfloated" ref is stored in the Src/Sink
object.
However, when create_ringbuffer() virtual function returns a non-floating ref,
the gst_object_ref_sink() inside gst_object_set_parent() increments the
refcount which is wrong. For example, if the create_ringbuffer() vfunc returned
object with refcount = 1, the gst_audio_base_{src,sink}_create_ringbuffer()
returns the object with refcount = 2, while there is in fact only one ref held
by the src/sink which is ringbuffer's parent.
--
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