avformat: use ff_alloc_extradata()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol
2013-10-13 10:30:59 +00:00
parent 3fd79833e2
commit a807c68253
52 changed files with 83 additions and 218 deletions

View File

@@ -113,9 +113,7 @@ static int redspark_read_header(AVFormatContext *s)
goto fail;
}
codec->extradata_size = 32 * codec->channels;
codec->extradata = av_malloc(codec->extradata_size);
if (!codec->extradata) {
if (ff_alloc_extradata(codec, 32 * codec->channels)) {
ret = AVERROR(ENOMEM);
goto fail;
}