diff options
author | Diego Biurrun <diego@biurrun.de> | 2014-06-20 00:04:36 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-06-22 18:43:11 +0200 |
commit | 73953df71a28e94d8959facba7906cf5975ca4ef (patch) | |
tree | 2b9cb23701465e766ef67686b33bb1c13ad67699 /libavformat/rmdec.c | |
parent | f83896abda1e78ebbbda0f184b682b4fabadc682 (diff) | |
download | ffmpeg-73953df71a28e94d8959facba7906cf5975ca4ef.tar.gz |
Replace av_malloc() and memset(0) by av_mallocz()
Diffstat (limited to 'libavformat/rmdec.c')
-rw-r--r-- | libavformat/rmdec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index eb0f3c5ff0..79a07566de 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -86,11 +86,10 @@ 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); + avctx->extradata = av_mallocz(size + FF_INPUT_BUFFER_PADDING_SIZE); if (!avctx->extradata) 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; |