diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-10-13 10:30:59 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-10-13 20:13:38 +0000 |
commit | a807c68253b02cce8b9fbc87d7857c31d531a1ee (patch) | |
tree | e4097d5fd4a2cf8dc03c6f97ebfadc4d20ce8ac2 /libavformat/apc.c | |
parent | 3fd79833e266aec2d77cf07092e8b1406fd307d4 (diff) | |
download | ffmpeg-a807c68253b02cce8b9fbc87d7857c31d531a1ee.tar.gz |
avformat: use ff_alloc_extradata()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/apc.c')
-rw-r--r-- | libavformat/apc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/apc.c b/libavformat/apc.c index bb28a628f7..08ae9351dc 100644 --- a/libavformat/apc.c +++ b/libavformat/apc.c @@ -23,6 +23,7 @@ #include "libavutil/channel_layout.h" #include "avformat.h" +#include "internal.h" static int apc_probe(AVProbeData *p) { @@ -51,10 +52,7 @@ static int apc_read_header(AVFormatContext *s) avio_rl32(pb); /* number of samples */ st->codec->sample_rate = avio_rl32(pb); - st->codec->extradata_size = 2 * 4; - st->codec->extradata = av_malloc(st->codec->extradata_size + - FF_INPUT_BUFFER_PADDING_SIZE); - if (!st->codec->extradata) + if (ff_alloc_extradata(st->codec, 2 * 4)) return AVERROR(ENOMEM); /* initial predictor values for adpcm decoder */ |