diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-10-13 14:30:59 +0400 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-10-14 00:13:38 +0400 |
commit | a807c68253b02cce8b9fbc87d7857c31d531a1ee (patch) | |
tree | e4097d5fd4a2cf8dc03c6f97ebfadc4d20ce8ac2 /libavformat/omadec.c | |
parent | 3fd79833e266aec2d77cf07092e8b1406fd307d4 (diff) |
avformat: use ff_alloc_extradata()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/omadec.c')
-rw-r--r-- | libavformat/omadec.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/omadec.c b/libavformat/omadec.c index e4291d9b55..4017db3f2b 100644 --- a/libavformat/omadec.c +++ b/libavformat/omadec.c @@ -349,12 +349,10 @@ static int oma_read_header(AVFormatContext *s) /* fake the ATRAC3 extradata * (wav format, makes stream copy to wav work) */ - st->codec->extradata_size = 14; - edata = av_mallocz(14 + FF_INPUT_BUFFER_PADDING_SIZE); - if (!edata) + if (ff_alloc_extradata(st->codec, 14)) return AVERROR(ENOMEM); - st->codec->extradata = edata; + edata = st->codec->extradata; AV_WL16(&edata[0], 1); // always 1 AV_WL32(&edata[2], samplerate); // samples rate AV_WL16(&edata[6], jsflag); // coding mode |