[FFmpeg-cvslog] avformat/ffmenc: Use ffio_free_dyn_buf()

Michael Niedermayer git at videolan.org
Fri Feb 27 13:57:03 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Feb 27 13:19:05 2015 +0100| [d490b26fcb1b36c91099537a08d9a217d4782451] | committer: Michael Niedermayer

avformat/ffmenc: Use ffio_free_dyn_buf()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/ffmenc.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavformat/ffmenc.c b/libavformat/ffmenc.c
index adb5019..3abbfdd 100644
--- a/libavformat/ffmenc.c
+++ b/libavformat/ffmenc.c
@@ -25,6 +25,7 @@
 #include "libavutil/parseutils.h"
 #include "libavutil/opt.h"
 #include "avformat.h"
+#include "avio_internal.h"
 #include "internal.h"
 #include "ffm.h"
 
@@ -127,7 +128,6 @@ static int ffm_write_header_codec_ctx(AVIOContext *pb, AVCodecContext *ctx, unsi
 {
     AVIOContext *tmp;
     char *buf = NULL;
-    uint8_t *p = NULL;
     int ret, need_coma = 0;
 
 #define SKIP_DEFAULTS   AV_OPT_SERIALIZE_SKIP_DEFAULTS
@@ -156,8 +156,7 @@ static int ffm_write_header_codec_ctx(AVIOContext *pb, AVCodecContext *ctx, unsi
     return 0;
   fail:
     av_free(buf);
-    avio_close_dyn_buf(tmp, &p);
-    av_free(p);
+    ffio_free_dyn_buf(&tmp);
     return ret;
 
 #undef SKIP_DEFAULTS



More information about the ffmpeg-cvslog mailing list