After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 369942 - [PATCH] unblocking blocked pad does not release all blocked threads
[PATCH] unblocking blocked pad does not release all blocked threads
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.10
Other Linux
: Normal normal
: 0.10.11
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-11-03 11:25 UTC by Mark Nauwelaerts
Modified: 2006-11-30 22:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Possible patch (665 bytes, patch)
2006-11-03 11:33 UTC, Mark Nauwelaerts
committed Details | Review

Description Mark Nauwelaerts 2006-11-03 11:25:48 UTC
GST_PAD_BLOCK_SIGNAL only wakes up a single thread waiting on a blocked pad.
However, it is possible to have more than 1 thread blocked, e.g. in the situation
elementX ! queue:
- elementX sends event, is queued, queue_loop tries to send out and blocks src
- elementX (after sending event) performs pad_alloc, this thread crosses the "queue thread boundary" and is also blocked on queue.src
Comment 1 Mark Nauwelaerts 2006-11-03 11:33:03 UTC
Created attachment 75924 [details] [review]
Possible patch

Simple patch; use _broadcast in stead of _signal.

Wake up all waiting threads when unblocking blocked pad.
Comment 2 Wim Taymans 2006-11-03 13:57:30 UTC
        Patch by: Mark Nauwelaerts <manauw at skynet dot be>

        * gst/gstpad.c: (gst_pad_init), (pre_activate),
        (gst_pad_set_blocked_async), (gst_pad_acceptcaps_default),
        (gst_pad_accept_caps), (handle_pad_block), (gst_pad_push_event):
        Some small cleanups. Improve debugging.
        * gst/gstpad.h:
        Signal all waiting threads with a broadcast instead of just one.
        Fixes #369942.