[FFmpeg-cvslog] avformat/apetag: use ff_get_extradata()
Michael Niedermayer
git at videolan.org
Wed Dec 25 17:48:52 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 25 16:37:42 2013 +0100| [f04fc386dc23064cb5414bed56bd837e011ab09c] | committer: Michael Niedermayer
avformat/apetag: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f04fc386dc23064cb5414bed56bd837e011ab09c
---
libavformat/apetag.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/libavformat/apetag.c b/libavformat/apetag.c
index a376a0b..6e59bc7 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 {
More information about the ffmpeg-cvslog
mailing list