[Bug 765728] adaptivedemux: Segfault since "use realtime_clock for waiting for a condition" commit

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu May 5 12:20:39 UTC 2016


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

A Ashley <bugzilla at ashley-family.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #327009|reviewed                    |none
             status|                            |
 Attachment #327009|0                           |1
        is obsolete|                            |

--- Comment #26 from A Ashley <bugzilla at ashley-family.net> ---
Created attachment 327345
  --> https://bugzilla.gnome.org/attachment.cgi?id=327345&action=edit
adaptivedemux: fix threading issues in gst_adaptive_demux_wait_until function

The gst_adaptive_demux_wait_until() function can be woken up either by its
end_time being reached, or from other threads that want to interrupt the
waiting thread.

If the thread is interrupted, it needs to cancel its async clock callback by
unscheduling the clock callback. However, the callback task might already have
been activated, but is waiting for the mutex to become available. In this case,
the call to unschedule does not stop the callback from executing.

The solution to this second issue is to use a reference counted object that is
decremented by both the gst_adaptive_demux_wait_until() function and the call
to gst_clock_id_wait_async (). In this way, the GstAdaptiveDemuxTimer object is
only deleted when both the gst_adaptive_demux_wait_until() function and the
async callback are finished with the object.

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