]> git.sesse.net Git - vlc/commitdiff
avcodec: use av_freep instead of avcodec_free_frame
authorIlkka Ollakka <ileoo@videolan.org>
Wed, 24 Oct 2012 16:21:01 +0000 (19:21 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 24 Oct 2012 16:27:32 +0000 (19:27 +0300)
avcodec_free_frame isn't in untill 54.28.0 and were in 52.25.0

modules/codec/avcodec/encoder.c

index dc71b8ace903e1dad8746a812cdd7338aa0a5aca..2ec1a0787b66838c7111314d98fb71d82cb64896 100644 (file)
@@ -917,7 +917,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
             {
                 msg_Warn( p_enc, "almost fed libavcodec with two frames with the "
                          "same PTS (%"PRId64 ")", frame->pts );
-                avcodec_free_frame( &frame );
+                av_freep( &frame );
                 return NULL;
             }
             else if ( p_sys->i_last_pts > frame->pts )
@@ -925,7 +925,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
                 msg_Warn( p_enc, "almost fed libavcodec with a frame in the "
                          "past (current: %"PRId64 ", last: %"PRId64")",
                          frame->pts, p_sys->i_last_pts );
-                avcodec_free_frame( &frame );
+                av_freep( &frame );
                 return NULL;
             }
             else
@@ -938,7 +938,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
 
         i_out = avcodec_encode_video( p_sys->p_context, p_block->p_buffer,
                                      p_block->i_buffer, frame );
-        avcodec_free_frame( &frame );
+        av_freep( &frame );
     }
     else
     {