[Bug 769394] New: appsink callback race condition

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Aug 1 18:54:21 UTC 2016


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

            Bug ID: 769394
           Summary: appsink callback race condition
    Classification: Platform
           Product: GStreamer
           Version: 1.8.0
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: jake.foytik at ipconfigure.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

In gstappsink.c, it is possible to get undefined behavior if the
gst_app_sink_set_callbacks() function is called while the element is in the
PLAYING state and actively using the already set callbacks. 

For example, it is possible for the gst_app_sink_set_callbacks() function to
set callbacks.new_sample = NULL just after the gst_app_sink_render() function
checks if callback.new_sample == NULL.

This can be prevented by adding a mutex around the usage of the callbacks and
around the gst_app_sink_set_callbacks() function. Another option is to not
allow the callbacks to be set if the element is in the PLAYING state.

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