[Bug 704918] New: gst_base_src_negotiate() might not be called
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Fri Jul 26 00:58:16 PDT 2013
https://bugzilla.gnome.org/show_bug.cgi?id=704918
GStreamer | gstreamer (core) | 1.0.8
Summary: gst_base_src_negotiate() might not be called
Classification: Platform
Product: GStreamer
Version: 1.0.8
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: visechelle at gmail.com
QAContact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Created an attachment (id=250183)
View: https://bugzilla.gnome.org/attachment.cgi?id=250183
Review: https://bugzilla.gnome.org/review?bug=704918&attachment=250183
Patch
gst_base_src_negotiate() might not be called before pushing the first buffer in
gstbasesrc.c. In gst_base_src_loop(), the buffer pool allocation is done when
calling gst_base_src_negotiate(). Using GST_PAD_FLAG_NEED_RECONFIGURE as a
marker to know that buffer pool allocation should be done seems not enough.
Indeed, in the case of an element with fixed caps (e.g.: v4l2src), the element
will unset GST_PAD_FLAG_NEED_RECONFIGURE flag calling
gst_pad_check_reconfigure() when receiving a reconfigure event. This means that
if a reconfigure event is received between the call of
gst_pad_mark_reconfigure() in gst_base_src_start_complete() and the start of
the task that will call gst_base_src_loop(), the flag might be unset and the
buffer pool will not be allocated, leading to a segmentation fault.
I think another condition should be added in gst_base_src_loop() to prevent
such a case from happening. Checking that src->priv->pool is a not NULL pointer
should make it as done in the patch in attachment.
--
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