[vlc-devel] [PATCH 1/2] decoder: call vout_FlushAll() under lock
Steve Lhomme
robux4 at ycbcr.xyz
Wed Sep 4 15:09:30 CEST 2019
The idea here is to avoid an unlock+lock. We don't need it so it's
better not to do it at all.
On 2019-09-03 13:06, Thomas Guillem wrote:
> It is not needed. Cf my patch comment. DecoderProcessFlush() is called from DecoderThread(). Here we are in the output thread.
>
> On Tue, Sep 3, 2019, at 12:14, Steve Lhomme wrote:
>> That's how it's done in DecoderProcessFlush()
>> ---
>> src/input/decoder.c | 4 ----
>> 1 file changed, 4 deletions(-)
>>
>> diff --git a/src/input/decoder.c b/src/input/decoder.c
>> index 72ea6b8941..50b2f536d6 100644
>> --- a/src/input/decoder.c
>> +++ b/src/input/decoder.c
>> @@ -984,7 +984,6 @@ static int DecoderPlayVideo( struct decoder_owner
>> *p_owner, picture_t *p_picture
>> }
>>
>> p_owner->i_preroll_end = PREROLL_NONE;
>> - vlc_mutex_unlock( &p_owner->lock );
>>
>> if( unlikely(prerolled) )
>> {
>> @@ -994,9 +993,6 @@ static int DecoderPlayVideo( struct decoder_owner
>> *p_owner, picture_t *p_picture
>> vout_FlushAll( p_vout );
>> }
>>
>> - /* */
>> - vlc_mutex_lock( &p_owner->lock );
>> -
>> if( p_owner->b_waiting && !p_owner->b_first )
>> {
>> p_owner->b_has_data = true;
>> --
>> 2.17.1
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> 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