Skip to content
  • Jan Schmidt's avatar
    playback: Fix a small race on decodebin/parsebin shutdown. · c2a91d2c
    Jan Schmidt authored
    When shutting down decodebin2 and parsebin, they set their
    output pads to flushing, and there is a very small window
    where elements might send a sticky event such as a tag event
    (which silently fails due to flushing) and then sends a buffer,
    and the buffer will return GST_FLOW_ERROR because it can't
    forward sticky events. The element will then send an error
    message on the bus. This can also happen when elements send EOS
    just as shutdown is happening. Since we're about to destroy all
    the elements inside parsebin and decodebin anyway, just discard
    error messages from them.
    
    A nicer but more difficult fix for GStreamer 2.0 is to make
    all event pushing / handling in core return a GstFlowReturn
    like buffers do, so we can report a FLUSHING state cleanly.
    c2a91d2c