[Libva] [LIBVA-INTEL_DRIVER] [PATCH] Enc: Free the misc_params for the previous frame

Zhao, Yakui yakui.zhao at intel.com
Sat Mar 19 12:38:30 UTC 2016


From: Zhao Yakui <yakui.zhao at intel.com>

Otherwise the misc_params for the previous frame will be used
if the misc_param is not passed for the new frame.

Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
---
 src/i965_drv_video.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 1381324..bde1ce9 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -2723,6 +2723,9 @@ i965_BeginPicture(VADriverContextP ctx,
         for (i = 0; i < obj_context->codec_state.encode.num_slice_params_ext; i++)
             i965_release_buffer_store(&obj_context->codec_state.encode.slice_params_ext[i]);
 
+        for (i = 0; i < ARRAY_ELEMS(obj_context->codec_state.encode.misc_param); i++)
+            i965_release_buffer_store(&obj_context->codec_state.encode.misc_param[i]);
+
         obj_context->codec_state.encode.num_slice_params_ext = 0;
         obj_context->codec_state.encode.current_render_target = render_target;     /*This is input new frame*/
         obj_context->codec_state.encode.last_packed_header_type = 0;
-- 
1.9.0



More information about the Libva mailing list