[vlc-devel] [PATCH] qsv: fix invalid assert on error
Thomas Guillem
thomas at gllm.fr
Wed Jan 13 14:56:37 UTC 2021
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
More information about the vlc-devel
mailing list