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

Thomas Guillem thomas at gllm.fr
Wed Sep 2 14:10:31 CEST 2015

On Wed, Sep 2, 2015, at 13:24, Rémi Denis-Courmont wrote:
> Le 2015-09-02 14:05, Rémi Denis-Courmont a écrit :
> > Le 2015-09-02 13:54, Rémi Denis-Courmont a écrit :
> >> Or stop was requested, and the decoder owner should have flushed the
> >> decoder already.
> >>
> >> Either way, the decoder input queue should be empty already.
> >
> > It looks like ES out only explicitly flushes on seek, but not on
> > stop. Not sure if this should be considered a bug.
> And that's because DecoderFlush() waits for the decoder thread to 
> complete flusing. Ideally it wouldn't need to do that though.

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 ?

For the DecoderThread, I didn't see that the cancellation point was
called only when the fifo was empty. So an other way to fix this issue
is to add an other cancellation point when the fifo is not empty (but I
would prefer calling DecoderFlush from Delete).

(The issue is easier to see when you increase file caching.)

> -- 
> Rémi Denis-Courmont
> http://www.remlab.net/
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

More information about the vlc-devel mailing list