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

Rémi Denis-Courmont remi at remlab.net
Thu Sep 3 09:03:12 CEST 2015

Le 2015-09-03 09:53, Thomas Guillem a écrit :
>> > If DecodeFlush don't wait for flushed state, we can solve this 
>> issue
>> > either by calling DecoderFlush from input_DecoderDelete or by 
>> calling
>> > input_DecoderFlush from ES out when deleting the decoder, right ?
>> I think so.
> Then, a FLUSH packet will be sent to decoders just before closing. Do 
> we
> want that ?
> (For the async MediaCodec, I flush from close because it's the only 
> way
> to unblock the output thread but not all decoders want to flush from
> close.)

All decoders should flush on close. You can no longer output anything 
by that point. If the decoder owner wanted to drain cleanly, it would 
have called decode(NULL) prior to close.

Still, performance at exit does not seem like the top priority item. If 
it were me, I would solve more important issues before adding more code 
for minor ones. If you really want to solve this now, adding a 
vlc_testcancel() call in the outer most decoder thread loop is the 

Rémi Denis-Courmont

More information about the vlc-devel mailing list