• Tim-Philipp Müller's avatar
    queue2: don't change global buffering state from within query handler · c02081ca
    Tim-Philipp Müller authored
    When a buffering query is handled it uses the get_buffering_percent()
    function to get some statitics. Unfortunately this function also
    calculates whether the queue should be buffering and adapts the
    global queue2 state in case of state transitions from/to buffering
    (including whether a buffering message was posted on the bus!).
    This means that there is a race which can cause buffering messages
    to never posted if the global state changes happen as a result of aa
    query instead of resulting from bytes flowing in/out.
    Spotted by Sjoerd Simons.
    Change to only query state in get_buffering_percent() and update
    state only in update_buffering().
gstqueue2.c 106 KB