<p dir="ltr">Hello,</p>
<p dir="ltr">Le 23 sept. 2016 11:16, Thomas Guillem <thomas@gllm.fr> a écrit :<br>
><br>
> Don't try to request a vout if it previously failed. A new vout will be<br>
> requested if the fmt_out changes. This save a *lot* of CPU cycles when playing<br>
> a sample with an invalid fmt_out.</p>
<p dir="ltr">It does if the decoder changes the format at every buffer allocation. But I understood you would fix that? Then there is not much to save anymore - and it breaks the corner case where vout creation fails before it "somehow" succeeds.</p>
<p dir="ltr">I would rather decouple format change and picture allocation first. Then re-evaluate whether this patch still makes sense.</p>
<p dir="ltr">> ---<br>
> src/input/decoder.c | 5 +++--<br>
> 1 file changed, 3 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/src/input/decoder.c b/src/input/decoder.c<br>
> index a736143..d44789e 100644<br>
> --- a/src/input/decoder.c<br>
> +++ b/src/input/decoder.c<br>
> @@ -369,8 +369,7 @@ static int vout_update_format( decoder_t *p_dec )<br>
> {<br>
>      decoder_owner_sys_t *p_owner = p_dec->p_owner;<br>
><br>
> -    if( p_owner->p_vout == NULL<br>
> -     || p_dec->fmt_out.video.i_width != p_owner->fmt.video.i_width<br>
> +    if( p_dec->fmt_out.video.i_width != p_owner->fmt.video.i_width<br>
>       || p_dec->fmt_out.video.i_height != p_owner->fmt.video.i_height<br>
>       || p_dec->fmt_out.video.i_visible_width != p_owner->fmt.video.i_visible_width<br>
>       || p_dec->fmt_out.video.i_visible_height != p_owner->fmt.video.i_visible_height<br>
> @@ -492,6 +491,8 @@ static int vout_update_format( decoder_t *p_dec )<br>
>              return -1;<br>
>          }<br>
>      }<br>
> +    else if( p_owner->p_vout == NULL )<br>
> +        return -1;<br>
>      return 0;<br>
> }<br>
><br>
> -- <br>
> 2.9.3<br>
><br>
> _______________________________________________<br>
> vlc-devel mailing list<br>
> To unsubscribe or modify your subscription options:<br>
> https://mailman.videolan.org/listinfo/vlc-devel<br></p>