Commit a1ce41c9 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mpc: use ff_get_extradata()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 3e5a7dff
......@@ -95,9 +95,8 @@ static int mpc_read_header(AVFormatContext *s)
st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
st->codec->bits_per_coded_sample = 16;
if (ff_alloc_extradata(st->codec, 16))
if (ff_get_extradata(st->codec, s->pb, 16) < 0)
return AVERROR(ENOMEM);
avio_read(s->pb, st->codec->extradata, 16);
st->codec->sample_rate = mpc_rate[st->codec->extradata[2] & 3];
avpriv_set_pts_info(st, 32, MPC_FRAMESIZE, st->codec->sample_rate);
/* scan for seekpoints */
......
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