[vlc-devel] [vlc-commits] decoder: handle pause within the decoder thread

Rémi Denis-Courmont remi at remlab.net
Thu Nov 5 13:45:37 CET 2015


Le 2015-11-05 15:33, Thomas Guillem a écrit :
>> @@ -928,6 +907,16 @@ static void DecoderPlayVideo( decoder_t *p_dec,
>> picture_t *p_picture,
>>
>>      vlc_mutex_unlock( &p_owner->lock );
>>
>> +    /* FIXME: The *input* FIFO should not be locked here. This will 
>> not
>> work
>> +     * properly if/when pictures are queued asynchronously (c.f.
>> assert()). */
>> +    vlc_fifo_Lock( p_owner->p_fifo );
>> +    if( p_owner->paused )
>> +    {
>> +       assert( p_owner->frames_countdown > 0 );
>
> It asserts here on Desktop with libavcodec when pausing a video. 
> Indeed,
> even with synchronous decoders, input_DecoderChangePause can be 
> called
> while the DecoderThread is in DecoderDecodeVideo.

That should be easy to fix.

But the elephant in the room is frame by frame's ever brokeness. If you 
want to implement asynchronous video decoders,  I think you will have to 
remove it. And then the feature regression police will get you.

-- 
Rémi Denis-Courmont
http://www.remlab.net/


More information about the vlc-devel mailing list