[vlc-devel] [PATCH] decoder: empty the input fifo on delete
Rémi Denis-Courmont
remi at remlab.net
Wed Sep 2 14:19:07 CEST 2015
Le 2015-09-02 15:10, Thomas Guillem a écrit :
> 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 ?
I think so.
> 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 obvious work-around is to call vlc_testcancel().
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list