]> granicus.if.org Git - libvpx/commitdiff
Fix memory leak in vpx_codec_enc_config_set()
authorJohn Koleszar <jkoleszar@google.com>
Wed, 23 May 2012 19:03:39 +0000 (12:03 -0700)
committerJohn Koleszar <jkoleszar@google.com>
Wed, 23 May 2012 19:59:40 +0000 (12:59 -0700)
Resolution changes in calls to vpx_codec_enc_config_set() would cause
a memory leak due to failing to release the lookahead and alt ref
buffers.

Change-Id: I48392ea25e71fe2760d60cfde3fb3874598cc85f

vp8/encoder/onyx_if.c

index cee62fa50342631ee404893476e83a0cf7afdaa9..b7699aeb731a04884fc7b1ffcf72618a8b9bfb97 100644 (file)
@@ -1655,6 +1655,7 @@ void vp8_change_config(VP8_COMP *cpi, VP8_CONFIG *oxcf)
           cm->yv12_fb[cm->lst_fb_idx].y_height ||
         cm->yv12_fb[cm->lst_fb_idx].y_width == 0)
     {
+        dealloc_raw_frame_buffers(cpi);
         alloc_raw_frame_buffers(cpi);
         vp8_alloc_compressor_data(cpi);
     }