[vlc-commits] avcodec: fix memory leaks of frame side-data

Hannes Domani git at videolan.org
Wed Sep 3 01:56:09 CEST 2014


vlc | branch: master | Hannes Domani <ssbssa at yahoo.de> | Tue Sep  2 20:14:23 2014 +0200| [26e73f0ff54f6f65519443679748c75d437f03ba] | committer: Jean-Baptiste Kempf

avcodec: fix memory leaks of frame side-data

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=26e73f0ff54f6f65519443679748c75d437f03ba
---

 modules/codec/avcodec/video.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index e5f45c7..d20276b 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -399,7 +399,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
     if( ffmpeg_OpenCodec( p_dec ) < 0 )
     {
         msg_Err( p_dec, "cannot open codec (%s)", p_sys->psz_namecodec );
-        av_free( p_sys->p_ff_pic );
+        avcodec_free_frame( &p_sys->p_ff_pic );
         vlc_sem_destroy( &p_sys->sem_mt );
         free( p_sys );
         return VLC_EGENERIC;
@@ -775,7 +775,7 @@ void EndVideoDec( decoder_t *p_dec )
     wait_mt( p_sys );
 
     if( p_sys->p_ff_pic )
-        av_free( p_sys->p_ff_pic );
+        avcodec_free_frame( &p_sys->p_ff_pic );
 
     if( p_sys->p_va )
         vlc_va_Delete( p_sys->p_va );



More information about the vlc-commits mailing list