OSDN Git Service

Fix slice-param & slice-data buffer memory leaks.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Tue, 11 Oct 2011 12:16:31 +0000 (14:16 +0200)
committerGwenole Beauchesne <gb@macbook-de-gwenole-beauchesne.local>
Tue, 11 Oct 2011 12:20:41 +0000 (14:20 +0200)
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
NEWS
src/i965_drv_video.c

diff --git a/NEWS b/NEWS
index 8b7ac3b..072b168 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Version 1.0.15 - DD.Oct.2011
 * Fix VC-1 decoding (TTFRM packing)
 * Fix MPEG-2 decoding on Ivy Bridge
 * Fix MPEG-2 decoding with sparse QM matrices updates
+* Fix slice-param & slice-data buffer memory leaks
 
 Version 1.0.14 - 28.Jul.2011
 * Add H.264 encoding support to Ivy Bridge
index 851d7f5..89c01be 100644 (file)
@@ -1532,8 +1532,6 @@ i965_EndPicture(VADriverContextP ctx, VAContextID context)
         }
     } else {
         obj_context->codec_state.dec.current_render_target = -1;
-        obj_context->codec_state.dec.num_slice_params = 0;
-        obj_context->codec_state.dec.num_slice_datas = 0;
         i965_release_buffer_store(&obj_context->codec_state.dec.pic_param);
         i965_release_buffer_store(&obj_context->codec_state.dec.iq_matrix);
         i965_release_buffer_store(&obj_context->codec_state.dec.bit_plane);
@@ -1542,6 +1540,8 @@ i965_EndPicture(VADriverContextP ctx, VAContextID context)
             i965_release_buffer_store(&obj_context->codec_state.dec.slice_params[i]);
             i965_release_buffer_store(&obj_context->codec_state.dec.slice_datas[i]);
         }
+        obj_context->codec_state.dec.num_slice_params = 0;
+        obj_context->codec_state.dec.num_slice_datas = 0;
     }
 
     return VA_STATUS_SUCCESS;