summaryrefslogtreecommitdiff
path: root/libavformat/apetag.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-25 16:37:42 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-25 17:22:49 +0100
commitf04fc386dc23064cb5414bed56bd837e011ab09c (patch)
tree883d427c5a1c38fc5154dba8636ef72b4eea0e41 /libavformat/apetag.c
parent9e5fa1e55d183b7fae7543dc0b4cc856c3248b5a (diff)
avformat/apetag: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/apetag.c')
-rw-r--r--libavformat/apetag.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libavformat/apetag.c b/libavformat/apetag.c
index a376a0bc4a..6e59bc7de1 100644
--- a/libavformat/apetag.c
+++ b/libavformat/apetag.c
@@ -88,13 +88,8 @@ static int ape_tag_read_field(AVFormatContext *s)
st->attached_pic.stream_index = st->index;
st->attached_pic.flags |= AV_PKT_FLAG_KEY;
} else {
- if (ff_alloc_extradata(st->codec, size))
+ if (ff_get_extradata(st->codec, s->pb, size) < 0)
return AVERROR(ENOMEM);
- if (avio_read(pb, st->codec->extradata, size) != size) {
- av_freep(&st->codec->extradata);
- st->codec->extradata_size = 0;
- return AVERROR(EIO);
- }
st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT;
}
} else {