[vlc-devel] [PATCH] qsv: fix invalid assert on error

Alexandre Janniaux ajanni at videolabs.io
Wed Jan 13 16:06:08 UTC 2021


Hi,

LGTM,

Regards,
--
Alexandre Janniaux
Videolabs

On Wed, Jan 13, 2021 at 03:56:37PM +0100, Thomas Guillem wrote:
> Initialize the sys->packets list before handling error path that do
> check that this list is empty.
> ---
>  modules/codec/qsv.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/modules/codec/qsv.c b/modules/codec/qsv.c
> index 8f5e2aa003a..e996b2ae218 100644
> --- a/modules/codec/qsv.c
> +++ b/modules/codec/qsv.c
> @@ -437,6 +437,8 @@ static int Open(vlc_object_t *this)
>
>      enc->p_sys = sys;
>
> +    vlc_list_init(&sys->packets);
> +
>      config_ChainParse(enc, SOUT_CFG_PREFIX, sout_options, enc->p_cfg);
>
>      /* Checking if we are on software and are allowing it */
> @@ -603,7 +605,6 @@ static int Open(vlc_object_t *this)
>      enc->fmt_out.i_extra = i_extra;
>
>      sys->async_depth = sys->params.AsyncDepth;
> -    vlc_list_init(&sys->packets);
>
>      /* Vlc module configuration */
>      enc->fmt_in.i_codec                = VLC_CODEC_NV12; // Intel Media SDK requirement
> --
> 2.29.2
>
> _______________________________________________
> 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