Commit 375c9c19 authored by Hannes Domani's avatar Hannes Domani Committed by Jean-Baptiste Kempf

avcodec: fix memory leaks of frame side-data

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit 26e73f0ff54f6f65519443679748c75d437f03ba)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent b29a6237
...@@ -435,7 +435,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context, ...@@ -435,7 +435,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
if( ffmpeg_OpenCodec( p_dec ) < 0 ) if( ffmpeg_OpenCodec( p_dec ) < 0 )
{ {
msg_Err( p_dec, "cannot open codec (%s)", p_sys->psz_namecodec ); 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 ); vlc_sem_destroy( &p_sys->sem_mt );
free( p_sys ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
...@@ -812,7 +812,7 @@ void EndVideoDec( decoder_t *p_dec ) ...@@ -812,7 +812,7 @@ void EndVideoDec( decoder_t *p_dec )
wait_mt( p_sys ); wait_mt( p_sys );
if( p_sys->p_ff_pic ) 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 ) if( p_sys->p_va )
vlc_va_Delete( p_sys->p_va ); vlc_va_Delete( p_sys->p_va );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment