msdkvpp: clear the parameters after closing the session
authorHaihao Xiang <haihao.xiang@intel.com>
Thu, 2 Apr 2020 02:44:31 +0000 (10:44 +0800)
committerHaihao Xiang <haihao.xiang@intel.com>
Mon, 11 May 2020 02:16:44 +0000 (02:16 +0000)
Otherwise the stale values are used for the new process.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1159>

sys/msdk/gstmsdkvpp.c

index 37a40c7..93421b3 100644 (file)
@@ -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) {