Browse Source

avformat/avidec: use ff_get_extradata()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.2-rc1
Michael Niedermayer 11 years ago
parent
commit
e93bc3efbf
1 changed files with 2 additions and 6 deletions
  1. +2
    -6
      libavformat/avidec.c

+ 2
- 6
libavformat/avidec.c View File

@@ -654,11 +654,8 @@ static int avi_read_header(AVFormatContext *s)
st->codec->extradata_size = esize - 10 * 4;
} else
st->codec->extradata_size = size - 10 * 4;
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);
avio_read(pb,
st->codec->extradata,
st->codec->extradata_size);
}

// FIXME: check if the encoder really did this correctly
@@ -783,9 +780,8 @@ static int avi_read_header(AVFormatContext *s)
st = s->streams[stream_index];

if (size<(1<<30)) {
if (ff_alloc_extradata(st->codec, size))
if (ff_get_extradata(st->codec, pb, size) < 0)
return AVERROR(ENOMEM);
avio_read(pb, st->codec->extradata, st->codec->extradata_size);
}

if (st->codec->extradata_size & 1) //FIXME check if the encoder really did this correctly


Loading…
Cancel
Save