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/utils.c | |
parent | f83896abda1e78ebbbda0f184b682b4fabadc682 (diff) | |
download | ffmpeg-73953df71a28e94d8959facba7906cf5975ca4ef.tar.gz |
Replace av_malloc() and memset(0) by av_mallocz()
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index ab6c6bf0c9..133822b368 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2381,14 +2381,12 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) int i = st->parser->parser->split(st->codec, pkt->data, pkt->size); if (i > 0 && i < FF_MAX_EXTRADATA_SIZE) { st->codec->extradata_size = i; - st->codec->extradata = av_malloc(st->codec->extradata_size + - FF_INPUT_BUFFER_PADDING_SIZE); + st->codec->extradata = av_mallocz(st->codec->extradata_size + + FF_INPUT_BUFFER_PADDING_SIZE); if (!st->codec->extradata) return AVERROR(ENOMEM); memcpy(st->codec->extradata, pkt->data, st->codec->extradata_size); - memset(st->codec->extradata + i, 0, - FF_INPUT_BUFFER_PADDING_SIZE); } } |