[vlc-devel] [PATCH] decoder: empty the input fifo on delete

Rémi Denis-Courmont remi at remlab.net
Wed Sep 2 12:54:23 CEST 2015

Le 2015-09-02 13:45, Thomas Guillem a écrit :
> On Wed, Sep 2, 2015, at 12:31, Rémi Denis-Courmont wrote:
>> Le 2015-09-02 13:22, Thomas Guillem a écrit :
>> > This speeds up decoder termination.
>> Looks to me that this is actually slower due to contention.
>> b_flushing is what speeds it up (already).
> On android with MediaCodec when input_DecoderDelete is called,
> DecoderProcess continue to be called with valid blocks for around 30
> times. The decoder continue to output valid frames but they are 
> dropped
> since It can't create a new picture_t.

Either end-of-stream was reached, and the decoder owner should have 
drained the decoder before deleting it. Otherwise, the end of the stream 
would not be rendered.

Or stop was requested, and the decoder owner should have flushed the 
decoder already.

Either way, the decoder input queue should be empty already.

> Is this linked to the android cancel issue ? The DecoderThread should 
> be
> terminated after vlc_restorecancel( canc ), no ?

No. VLC does not use, and never used, asynchronous cancellation.

Rémi Denis-Courmont

More information about the vlc-devel mailing list