[vlc-devel] [PATCH] decoder: request the vout only one time per format

Thomas Guillem thomas at gllm.fr
Sun Jul 2 14:48:27 CEST 2017



On Sun, Jul 2, 2017, at 13:33, Rémi Denis-Courmont wrote:
> Le 2 juillet 2017 13:15:33 GMT+02:00, Thomas Guillem <thomas at gllm.fr>
> a écrit :>> This fixes a busyloop that cause serious visual glitches when trying
>> to request
>>>> a failing vout again and again.
>> 
>> ---
>> 
>>  src/input/decoder.c | 5 ++---
>> 
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>> 
>> 
>> 
>> diff --git a/src/input/decoder.c b/src/input/decoder.c
>> 
>> index dac313737a..b34e26cd4e 100644
>> 
>> --- a/src/input/decoder.c
>> 
>> +++ b/src/input/decoder.c
>> 
>> @@ -408,8 +408,7 @@ static int vout_update_format( decoder_t *p_dec )
>>>>  {
>> 
>>      decoder_owner_sys_t *p_owner = p_dec->p_owner;
>> 
>>  
>> 
>> -    if( p_owner->p_vout == NULL
>> 
>> -     || p_dec->fmt_out.video.i_width != p_owner->fmt.video.i_width
>>>> +    if( p_dec->fmt_out.video.i_width != p_owner->fmt.video.i_width
>>>>       || p_dec->fmt_out.video.i_height != p_owner->fmt.video.i_height
>>>>       || p_dec->fmt_out.video.i_visible_width != p_owner-
>>       || >fmt.video.i_visible_width
>>>>       || p_dec->fmt_out.video.i_visible_height != p_owner-
>>       || >fmt.video.i_visible_height
>>>> @@ -547,7 +546,7 @@ static int vout_update_format( decoder_t *p_dec )
>>>>          DecoderUpdateFormatLocked( p_dec );
>> 
>>          vlc_mutex_unlock( &p_owner->lock );
>> 
>>      }
>> 
>> -    return 0;
>> 
>> +    return p_owner->p_vout != NULL ? 0 : -1;
>> 
>>  }
>> 
>>  
>> 
>>  static picture_t *vout_new_buffer( decoder_t *p_dec )
>> 
> 
> This seems to break changing format

I tested it, video_format change is still well handled. Maybe there is a
specific case I didn't thought about ?
>  -- 
>  Rémi Denis-Courmont
>  Typed on an inconvenient virtual keyboard 
> _________________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170702/823a8228/attachment.html>


More information about the vlc-devel mailing list