avformat/flvdec: use ff_get_extradata()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/51/head
Michael Niedermayer 11 years ago
parent c633aeba45
commit d8d5258bb7
  1. 3
      libavformat/flvdec.c

@ -615,9 +615,8 @@ static int flv_read_close(AVFormatContext *s)
static int flv_get_extradata(AVFormatContext *s, AVStream *st, int size) static int flv_get_extradata(AVFormatContext *s, AVStream *st, int size)
{ {
av_free(st->codec->extradata); av_free(st->codec->extradata);
if (ff_alloc_extradata(st->codec, size)) if (ff_get_extradata(st->codec, s->pb, size) < 0)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
avio_read(s->pb, st->codec->extradata, st->codec->extradata_size);
return 0; return 0;
} }

Loading…
Cancel
Save