[vlc-commits] avcodec: video: unref frames instead of free

Ilkka Ollakka git at videolan.org
Wed Sep 7 11:16:44 CEST 2016


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Sep  4 11:58:34 2016 +0300| [e08e6f2f937271dd8aebd31abac8dc3067049ac3] | committer: Ilkka Ollakka

avcodec: video: unref frames instead of free

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

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

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index e0abfe8..eebc853 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -874,7 +874,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
         /* Nothing to display */
         if( !b_gotpicture )
         {
-            av_frame_free(&frame);
+            av_frame_unref(frame);
             if( i_used == 0 ) break;
             continue;
         }
@@ -897,7 +897,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
 
         if( !b_need_output_picture || ( !p_sys->p_va && !frame->linesize[0] ) )
         {
-            av_frame_free(&frame);
+            av_frame_unref(frame);
             continue;
         }
 
@@ -913,7 +913,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
 
             if( !p_pic )
             {
-                av_frame_free(&frame);
+                av_frame_unref(frame);
                 break;
             }
 
@@ -949,7 +949,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_free(&frame);
+        av_frame_unref(frame);
 
         /* Send decoded frame to vout */
         if (i_pts > VLC_TS_INVALID)



More information about the vlc-commits mailing list