[FFmpeg-devel] [PATCH 13/41] avformat/rmdec: use ff_alloc_extradata()
Paul B Mahol
onemda at gmail.com
Sun Oct 13 14:48:34 CEST 2013
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavformat/rmdec.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 278fc37..a79fbaf 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;
--
1.7.11.2
More information about the ffmpeg-devel
mailing list