summaryrefslogtreecommitdiffstats
path: root/libavformat/adxdec.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:14:32 +0100
commit482b2042cdb05f77cc4d82a07c010203ac7a4f08 (patch)
tree18f7ec8f135b2944efe9a5ec27c54e8062af80eb /libavformat/adxdec.c
parentee4e8050931250f609a37f300a1d1831a44ecb1b (diff)
downloadffmpeg-streaming-482b2042cdb05f77cc4d82a07c010203ac7a4f08.zip
ffmpeg-streaming-482b2042cdb05f77cc4d82a07c010203ac7a4f08.tar.gz
avformat/adxdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/adxdec.c')
-rw-r--r--libavformat/adxdec.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libavformat/adxdec.c b/libavformat/adxdec.c
index 0a0436f..fe22c3a 100644
--- a/libavformat/adxdec.c
+++ b/libavformat/adxdec.c
@@ -78,13 +78,8 @@ static int adx_read_header(AVFormatContext *s)
c->header_size = avio_rb16(s->pb) + 4;
avio_seek(s->pb, -4, SEEK_CUR);
- if (ff_alloc_extradata(avctx, c->header_size))
+ if (ff_get_extradata(avctx, s->pb, c->header_size) < 0)
return AVERROR(ENOMEM);
- if (avio_read(s->pb, avctx->extradata, c->header_size) < c->header_size) {
- av_freep(&avctx->extradata);
- return AVERROR(EIO);
- }
- avctx->extradata_size = c->header_size;
ret = avpriv_adx_decode_header(avctx, avctx->extradata,
avctx->extradata_size, &c->header_size,
OpenPOWER on IntegriCloud