diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-10-13 10:30:59 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-10-13 20:13:38 +0000 |
commit | a807c68253b02cce8b9fbc87d7857c31d531a1ee (patch) | |
tree | e4097d5fd4a2cf8dc03c6f97ebfadc4d20ce8ac2 /libavformat/rmdec.c | |
parent | 3fd79833e266aec2d77cf07092e8b1406fd307d4 (diff) |
avformat: use ff_alloc_extradata()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/rmdec.c')
-rw-r--r-- | libavformat/rmdec.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index 278fc37b45..a79fbaf4db 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -86,11 +86,9 @@ static int rm_read_extradata(AVIOContext *pb, AVCodecContext *avctx, unsigned si { if (size >= 1<<24) return -1; - avctx->extradata = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE); - if (!avctx->extradata) + if (ff_alloc_extradata(avctx, size)) return AVERROR(ENOMEM); avctx->extradata_size = avio_read(pb, avctx->extradata, size); - memset(avctx->extradata + avctx->extradata_size, 0, FF_INPUT_BUFFER_PADDING_SIZE); if (avctx->extradata_size != size) return AVERROR(EIO); return 0; |