[vlc-devel] [PATCH] decoder: unblock broken decoders when flushing
remi at remlab.net
Mon Oct 27 13:54:59 CET 2014
Le 2014-10-27 14:41, Thomas Guillem a écrit :
> MediaCodec or iomx with direct rendering can be stuck waiting for an
> buffer when video is paused since output buffers are released by
That is pretty much the correct behaviour. If you cannot yet obtain a
picture buffer to decode into, you can only wait or discard the picture.
If exiting or flushing, then discarding the picture might be best, but
somewhat obviously not when paused. Futhermore, picture buffer
references must be retained during pause so that the decoder can resume
properly. There are no warranties that we are on the edge of a group of
picture or whatever it is called.
The same goes for audio. If blocks were dropped during pause, there
would be a gap on resume, and likely audible glitches due to resampling.
> This previous hack didn't fix a deadlock when video was flushed on
There is no flush on pause to begin with, at least not in
decoder.c:input_DecoderChangePause(). Flushing on pause would be wrong
in many ways, notably as above.
If, hypothetically, some component flushes on pause upstream of the
decoder, then that component needs fixing.
More information about the vlc-devel