Commit 9e5fa1e5 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/apc: use ff_get_extradata()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent b59740ea
...@@ -52,11 +52,9 @@ static int apc_read_header(AVFormatContext *s) ...@@ -52,11 +52,9 @@ static int apc_read_header(AVFormatContext *s)
avio_rl32(pb); /* number of samples */ avio_rl32(pb); /* number of samples */
st->codec->sample_rate = avio_rl32(pb); st->codec->sample_rate = avio_rl32(pb);
if (ff_alloc_extradata(st->codec, 2 * 4))
return AVERROR(ENOMEM);
/* initial predictor values for adpcm decoder */ /* 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)) { if (avio_rl32(pb)) {
st->codec->channels = 2; st->codec->channels = 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment