diff options
author | Martin Storsjö <martin@martin.st> | 2015-02-24 14:07:54 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2015-02-24 23:07:47 +0200 |
commit | 8e32b1f0963d01d4f5d4803eb721f162e0d58d9a (patch) | |
tree | 94a91168329abd36f717b6fc7ea7b2ef60cdea2d /libavformat/id3v2.c | |
parent | 199fb40278146c5bb162990c66ad3cd561abc780 (diff) |
libavformat: Use ffio_free_dyn_buf where applicable
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/id3v2.c')
-rw-r--r-- | libavformat/id3v2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c index 3c5c06207f..b8994b2226 100644 --- a/libavformat/id3v2.c +++ b/libavformat/id3v2.c @@ -207,8 +207,8 @@ static int decode_str(AVFormatContext *s, AVIOContext *pb, int encoding, case ID3v2_ENCODING_UTF16BOM: if ((left -= 2) < 0) { av_log(s, AV_LOG_ERROR, "Cannot read BOM value, input too short\n"); - avio_close_dyn_buf(dynbuf, dst); - av_freep(dst); + ffio_free_dyn_buf(&dynbuf); + *dst = NULL; return AVERROR_INVALIDDATA; } switch (avio_rb16(pb)) { @@ -218,8 +218,8 @@ static int decode_str(AVFormatContext *s, AVIOContext *pb, int encoding, break; default: av_log(s, AV_LOG_ERROR, "Incorrect BOM value\n"); - avio_close_dyn_buf(dynbuf, dst); - av_freep(dst); + ffio_free_dyn_buf(&dynbuf); + *dst = NULL; *maxread = left; return AVERROR_INVALIDDATA; } |