From 98600942e4bed0e46e9bdeab97a32f9dc5825fae Mon Sep 17 00:00:00 2001 From: Haihao Xiang Date: Thu, 2 Apr 2020 10:44:31 +0800 Subject: [PATCH] msdkvpp: clear the parameters after closing the session Otherwise the stale values are used for the new process. Part-of: --- sys/msdk/gstmsdkvpp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/msdk/gstmsdkvpp.c b/sys/msdk/gstmsdkvpp.c index 37a40c77b0..93421b33aa 100644 --- a/sys/msdk/gstmsdkvpp.c +++ b/sys/msdk/gstmsdkvpp.c @@ -1028,6 +1028,10 @@ gst_msdkvpp_initialize (GstMsdkVPP * thiz) } MFXVideoVPP_Close (session); + + memset (&thiz->param, 0, sizeof (thiz->param)); + memset (&thiz->extra_params, 0, sizeof (thiz->extra_params)); + thiz->num_extra_params = 0; } if (thiz->use_video_memory) {