OSDN Git Service

Fix the incorrect reference count of reconstructed_object for VP9 enc
authorZhao Yakui <yakui.zhao@intel.com>
Tue, 17 Jan 2017 00:40:20 +0000 (08:40 +0800)
committerSean V Kelley <seanvk@posteo.de>
Tue, 17 Jan 2017 23:03:29 +0000 (15:03 -0800)
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
src/gen9_vp9_encoder.c

index 0de2cd7..f5c250b 100644 (file)
@@ -5613,6 +5613,8 @@ gen9_vp9_pak_pipeline_prepare(VADriverContextP ctx,
     obj_surface = encode_state->reconstructed_object;
     i965_check_alloc_surface_bo(ctx, obj_surface, 1, VA_FOURCC_NV12, SUBSAMPLE_YUV420);
 
+    dri_bo_unreference(pak_context->reconstructed_object.bo);
+
     pak_context->reconstructed_object.bo = obj_surface->bo;
     dri_bo_reference(pak_context->reconstructed_object.bo);