]> git.sesse.net Git - vlc/commitdiff
vda: fix major memory leak which killed decoding shortly after start (close #8440)
authorFelix Paul Kühne <fkuehne@videolan.org>
Thu, 2 May 2013 10:02:30 +0000 (12:02 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Thu, 2 May 2013 10:02:30 +0000 (12:02 +0200)
modules/codec/avcodec/vda.c

index 31eda1a09b16141d43e215b606f06fda65a84378..a0a791b85d805fc0288d68fe2dc6080eb17f64df 100644 (file)
@@ -103,6 +103,7 @@ static void vda_Copy420YpCbCr8Planar( picture_t *p_pic,
                   i_width, i_height, cache );
 
     CVPixelBufferUnlockBaseAddress( buffer, 0 );
+    CVPixelBufferRelease( buffer );
 }
 
 /*****************************************************************************
@@ -133,6 +134,7 @@ static void vda_Copy422YpCbCr8( picture_t *p_pic,
     }
 
     CVPixelBufferUnlockBaseAddress( buffer, 0 );
+    CVPixelBufferRelease( buffer );
 }
 
 static int Setup( vlc_va_t *p_external, void **pp_hw_ctx, vlc_fourcc_t *pi_chroma,