[vlc-commits] avcodec: fix memory leaks of frame side-data
Hannes Domani
git at videolan.org
Thu Sep 4 05:03:08 CEST 2014
vlc/vlc-2.2 | branch: master | Hannes Domani <ssbssa at yahoo.de> | Tue Sep 2 20:14:23 2014 +0200| [375c9c191a7746bee05dc74593fadd62205c0a90] | committer: Jean-Baptiste Kempf
avcodec: fix memory leaks of frame side-data
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit 26e73f0ff54f6f65519443679748c75d437f03ba)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=375c9c191a7746bee05dc74593fadd62205c0a90
---
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 9169bef..ad9be3b 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -435,7 +435,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;
@@ -812,7 +812,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