[vlc-devel] [PATCH 08/18] decoder: allow empty update_format callbacks in decoder owners
Rémi Denis-Courmont
remi at remlab.net
Mon Oct 28 13:51:38 CET 2019
It's still a bug to update the video format of a non-video ES. Patch is excessively broad IMO
Le 28 octobre 2019 14:41:25 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>Many of them do trivial things that can be factorized in
>decoder_helpers.
>---
> src/input/decoder_helpers.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
>index ce32608c92c..87ab6bc560f 100644
>--- a/src/input/decoder_helpers.c
>+++ b/src/input/decoder_helpers.c
>@@ -84,13 +84,15 @@ int decoder_UpdateVideoFormat( decoder_t *dec )
>int decoder_UpdateVideoOutput( decoder_t *dec, vlc_video_context
>*vctx_out )
> {
> vlc_assert( dec->fmt_in.i_cat == VIDEO_ES && dec->cbs != NULL );
>- if ( unlikely(dec->fmt_in.i_cat != VIDEO_ES || dec->cbs == NULL ||
>- dec->cbs->video.format_update == NULL) )
>+ if ( unlikely(dec->fmt_in.i_cat != VIDEO_ES || dec->cbs == NULL) )
> return -1;
>
> /* */
> dec->fmt_out.video.i_chroma = dec->fmt_out.i_codec;
>
>+ if (dec->cbs->video.format_update == NULL)
>+ return 0;
>+
> return dec->cbs->video.format_update( dec, vctx_out );
> }
>
>--
>2.17.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20191028/2b1697ab/attachment.html>
More information about the vlc-devel
mailing list