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 756645 - multiqueue: Improve incoming SEGMENT handling
multiqueue: Improve incoming SEGMENT handling
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal normal
: 1.6.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-15 14:36 UTC by Edward Hervey
Modified: 2015-10-19 12:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
multiqueue: Improve incoming SEGMENT handling (1.63 KB, patch)
2015-10-15 14:36 UTC, Edward Hervey
committed Details | Review

Description Edward Hervey 2015-10-15 14:36:42 UTC
See comment
Comment 1 Edward Hervey 2015-10-15 14:36:53 UTC
Created attachment 313378 [details] [review]
multiqueue: Improve incoming SEGMENT handling

Previously this code was just blindly setting the cached flow return
of downstream to GST_FLOW_OK when we get a SEGMENT.

The problem is that this can not be done blindly. If downstream was
not linked, the corresponding sinqlequeue source pad thread might be
waiting for the next ID to be woken up upon.

By blindly setting the cached return value to GST_FLOW_OK, and if that
stream was the only one that was NOT_LINKED, then the next time we
check (from any other thread) to see if we need to wake up a source pad
thread ... we won't even try, because none of the cached flow return
are equal to GST_FLOW_NOT_LINKED.

This would result in that thread never being woken up
Comment 2 Jan Schmidt 2015-10-16 09:35:27 UTC
Review of attachment 313378 [details] [review]:

The logic sounds reasonable. If the tests still pass, I say push it :)
Comment 3 Edward Hervey 2015-10-19 12:41:46 UTC
Pushed to both master and 1.6

commit ebeee60c3f6e4cdaf54e3d5f5569cadc5019f0f3
Author: Edward Hervey <edward@centricular.com>
Date:   Thu Oct 15 16:32:42 2015 +0200

    multiqueue: Improve incoming SEGMENT handling
    
    Previously this code was just blindly setting the cached flow return
    of downstream to GST_FLOW_OK when we get a SEGMENT.
    
    The problem is that this can not be done blindly. If downstream was
    not linked, the corresponding sinqlequeue source pad thread might be
    waiting for the next ID to be woken up upon.
    
    By blindly setting the cached return value to GST_FLOW_OK, and if that
    stream was the only one that was NOT_LINKED, then the next time we
    check (from any other thread) to see if we need to wake up a source pad
    thread ... we won't even try, because none of the cached flow return
    are equal to GST_FLOW_NOT_LINKED.
    
    This would result in that thread never being woken up
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756645