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/ape.c | |
parent | 3fd79833e266aec2d77cf07092e8b1406fd307d4 (diff) |
avformat: use ff_alloc_extradata()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/ape.c')
-rw-r--r-- | libavformat/ape.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/ape.c b/libavformat/ape.c index 7ed9dd813b..613a59d5f8 100644 --- a/libavformat/ape.c +++ b/libavformat/ape.c @@ -354,8 +354,8 @@ static int ape_read_header(AVFormatContext * s) st->duration = total_blocks; avpriv_set_pts_info(st, 64, 1, ape->samplerate); - st->codec->extradata = av_malloc(APE_EXTRADATA_SIZE); - st->codec->extradata_size = APE_EXTRADATA_SIZE; + if (ff_alloc_extradata(st->codec, APE_EXTRADATA_SIZE)) + return AVERROR(ENOMEM); AV_WL16(st->codec->extradata + 0, ape->fileversion); AV_WL16(st->codec->extradata + 2, ape->compressiontype); AV_WL16(st->codec->extradata + 4, ape->formatflags); |