diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-25 16:37:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-25 17:14:32 +0100 |
commit | 9e5fa1e55d183b7fae7543dc0b4cc856c3248b5a (patch) | |
tree | 3310042001dfc023a6aac9dcbd9d0faa7ffd5652 /libavformat/apc.c | |
parent | b59740eae53786dd166871f19d30758630a40171 (diff) | |
download | ffmpeg-9e5fa1e55d183b7fae7543dc0b4cc856c3248b5a.tar.gz |
avformat/apc: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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 08ae9351dc..21bb514cd0 100644 --- a/libavformat/apc.c +++ b/libavformat/apc.c @@ -52,11 +52,9 @@ static int apc_read_header(AVFormatContext *s) avio_rl32(pb); /* number of samples */ st->codec->sample_rate = avio_rl32(pb); - if (ff_alloc_extradata(st->codec, 2 * 4)) - return AVERROR(ENOMEM); - /* initial predictor values for adpcm decoder */ - avio_read(pb, st->codec->extradata, 2 * 4); + if (ff_get_extradata(st->codec, pb, 2 * 4) < 0) + return AVERROR(ENOMEM); if (avio_rl32(pb)) { st->codec->channels = 2; |