[vlc-commits] avcodec: fix frame leaks
Rémi Denis-Courmont
git at videolan.org
Sun Jun 28 10:57:47 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jun 28 11:46:15 2015 +0300| [1161760f167dc0b682aa859cce0ae805d44e32cb] | committer: Rémi Denis-Courmont
avcodec: fix frame leaks
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1161760f167dc0b682aa859cce0ae805d44e32cb
---
modules/codec/avcodec/video.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index b603457..dbf5a16 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -691,7 +691,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
if( i_used < 0 )
{
- av_frame_unref(frame);
+ av_frame_free(&frame);
if( b_drawpicture )
msg_Warn( p_dec, "cannot decode one frame (%zu bytes)",
p_block->i_buffer );
@@ -711,7 +711,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
/* Nothing to display */
if( !b_gotpicture )
{
- av_frame_unref(frame);
+ av_frame_free(&frame);
if( i_used == 0 ) break;
continue;
}
@@ -767,7 +767,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
if( !b_drawpicture || ( !p_sys->p_va && !frame->linesize[0] ) )
{
- av_frame_unref(frame);
+ av_frame_free(&frame);
continue;
}
@@ -779,7 +779,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
p_pic = ffmpeg_NewPictBuf( p_dec, p_context );
if( !p_pic )
{
- av_frame_unref(frame);
+ av_frame_free(&frame);
break;
}
@@ -815,7 +815,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
p_pic->b_progressive = !frame->interlaced_frame;
p_pic->b_top_field_first = frame->top_field_first;
- av_frame_unref(frame);
+ av_frame_free(&frame);
/* Send decoded frame to vout */
if (i_pts > VLC_TS_INVALID)
More information about the vlc-commits
mailing list