avformat/rl2: use ff_get_extradata()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-12-25 16:37:42 +01:00
parent 0b9ca70243
commit 61883a2e89
1 changed files with 1 additions and 5 deletions

View File

@ -127,13 +127,9 @@ static av_cold int rl2_read_header(AVFormatContext *s)
if(signature == RLV3_TAG && back_size > 0) if(signature == RLV3_TAG && back_size > 0)
st->codec->extradata_size += back_size; st->codec->extradata_size += back_size;
if(ff_alloc_extradata(st->codec, st->codec->extradata_size)) if(ff_get_extradata(st->codec, pb, st->codec->extradata_size) < 0)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
if(avio_read(pb,st->codec->extradata,st->codec->extradata_size) !=
st->codec->extradata_size)
return AVERROR(EIO);
/** setup audio stream if present */ /** setup audio stream if present */
if(sound_rate){ if(sound_rate){
if (!channels || channels > 42) { if (!channels || channels > 42) {