summaryrefslogtreecommitdiff
path: root/libavformat/id3v2.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-25 00:48:46 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-25 00:48:50 +0100
commit7f03f75ce72fe1c6adfc63f621eeb69cde13769a (patch)
tree7b20dea793e95c3fe5ab4bccbedd2e83e504f4d3 /libavformat/id3v2.c
parent7d9b06eb179fb0d032c530d21182dce3fe0a7671 (diff)
parent8e32b1f0963d01d4f5d4803eb721f162e0d58d9a (diff)
Merge commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a'
* commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a': libavformat: Use ffio_free_dyn_buf where applicable Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/id3v2.c')
-rw-r--r--libavformat/id3v2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index dae4aeb7c9..a8273e282c 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -265,8 +265,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)) {
@@ -276,8 +276,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;
}