GNOME Bugzilla – Bug 328279
[decodebin] timeout issue when pre-rolling
Last modified: 2006-01-23 15:08:20 UTC
Decodebin currently uses a fakesink and GstPadBlockCallbacks on raw pads to establish asynchronous state change from NULL/READY to PAUSED (i.e. prerolling). The problem is that if the demuxer contained within decodebin goes to EOS while prerolling, decodebin won't know about it and will hang in READY->PAUSED. The hang is because fakesink is only removed when all raw src pads have outputted one buffer (using the GstPadBlockCallbacks), but doesn't handle the case when you have EOS. The provided patch solves this issue by replacing the blocking pad callbacks with pad data probes, and removing fakesink if every pad has outputted a buffer or an EOS event has come through that pad.
Created attachment 57922 [details] [review] Patch to use probes in decodebin in order to solve stated issue
patch looks good, can't see any obvious problems with it.
AOL
2006-01-23 Edward Hervey <edward@fluendo.com> * gst/playback/gstdecodebin.c: (gst_decode_bin_init), (free_pad_probes), (remove_fakesink), (pad_probe), (close_pad_link), (gst_decode_bin_change_state): Replace GstPadBlockCallback with pad probes that detect first buffer AND eos before removing fakesink. Fixes hang with demuxers doing EOS while pre-rolling. Solves #328279