[Bug 676048] fix deadlock in gst app src

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed May 16 00:26:35 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=676048
  GStreamer | gstreamer (core) | 0.11.x

Wim Taymans <wim.taymans> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |wim.taymans at gmail.com
         Resolution|                            |FIXED
   Target Milestone|HEAD                        |0.11.x

--- Comment #1 from Wim Taymans <wim.taymans at gmail.com> 2012-05-16 07:26:30 UTC ---
The fix is not correct because it would set the result of the start operation
before the last step of the operation is completed (doing the seek).
Fortunately the solution is very easy: we use the stream lock to make the
streaming thread wait as done in this patch:


commit d6e909994c9316c69187a1e9729f45eeace62137
Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Wed May 16 09:16:26 2012 +0200

    basesrc: avoid potential deadlock

    In gst_base_src_start_complete() we do a perform_seek() that will
eventually
    start the streaming thread which acquires the live lock and then goes to
sleep
    in the case of appsrc. Right after we perform seek we also try to acquire
the
    live lock which might then deadlock.

    fix this by taking the stream lock before performing the seek. This makes
sure
    that the streaming thread cannot start and grab the live lock until we are
done
    and release the stream lock again.

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

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