avformat/ffmenc: Use ffio_free_dyn_buf()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-02-27 13:19:05 +01:00
parent 629a03a912
commit d490b26fcb

View File

@ -25,6 +25,7 @@
#include "libavutil/parseutils.h" #include "libavutil/parseutils.h"
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "avformat.h" #include "avformat.h"
#include "avio_internal.h"
#include "internal.h" #include "internal.h"
#include "ffm.h" #include "ffm.h"
@ -127,7 +128,6 @@ static int ffm_write_header_codec_ctx(AVIOContext *pb, AVCodecContext *ctx, unsi
{ {
AVIOContext *tmp; AVIOContext *tmp;
char *buf = NULL; char *buf = NULL;
uint8_t *p = NULL;
int ret, need_coma = 0; int ret, need_coma = 0;
#define SKIP_DEFAULTS AV_OPT_SERIALIZE_SKIP_DEFAULTS #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; return 0;
fail: fail:
av_free(buf); av_free(buf);
avio_close_dyn_buf(tmp, &p); ffio_free_dyn_buf(&tmp);
av_free(p);
return ret; return ret;
#undef SKIP_DEFAULTS #undef SKIP_DEFAULTS