[vlc-commits] avcodec: use av_freep instead of avcodec_free_frame

Ilkka Ollakka git at videolan.org
Wed Oct 24 18:27:38 CEST 2012


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Wed Oct 24 19:21:01 2012 +0300| [da801918ff715f56ea3817ab9aaa92d44822a7e1] | committer: Rémi Denis-Courmont

avcodec: use av_freep instead of avcodec_free_frame

avcodec_free_frame isn't in untill 54.28.0 and were in 52.25.0

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

 modules/codec/avcodec/encoder.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index dc71b8a..2ec1a07 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -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
     {



More information about the vlc-commits mailing list