summaryrefslogtreecommitdiff
path: root/libavformat/mpc8.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-25 16:37:42 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-25 17:38:29 +0100
commit6f7daae04315e90287f888b6cc7b36b13741251e (patch)
treef4e54c944f69428115d147f43f549ef39594400e /libavformat/mpc8.c
parenta1ce41c9a4ec8cf9eb8a4944e4188a51b88fbd70 (diff)
avformat/mpc8: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpc8.c')
-rw-r--r--libavformat/mpc8.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index 7017c187f7..0e9baaa426 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -241,9 +241,8 @@ static int mpc8_read_header(AVFormatContext *s)
st->codec->codec_id = AV_CODEC_ID_MUSEPACK8;
st->codec->bits_per_coded_sample = 16;
- if (ff_alloc_extradata(st->codec, 2))
+ if (ff_get_extradata(st->codec, pb, 2) < 0)
return AVERROR(ENOMEM);
- avio_read(pb, st->codec->extradata, st->codec->extradata_size);
st->codec->channels = (st->codec->extradata[1] >> 4) + 1;
st->codec->sample_rate = mpc8_rate[st->codec->extradata[0] >> 5];