diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 2375eb1a1f..96504e704d 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -558,20 +558,13 @@ static int flv_read_metabody(AVFormatContext *s, int64_t next_pos) static int flv_read_header(AVFormatContext *s) { - int offset, flags; + int offset; avio_skip(s->pb, 4); - flags = avio_r8(s->pb); + avio_r8(s->pb); // flags s->ctx_flags |= AVFMTCTX_NOHEADER; - if (flags & FLV_HEADER_FLAG_HASVIDEO) - if (!create_stream(s, AVMEDIA_TYPE_VIDEO)) - return AVERROR(ENOMEM); - if (flags & FLV_HEADER_FLAG_HASAUDIO) - if (!create_stream(s, AVMEDIA_TYPE_AUDIO)) - return AVERROR(ENOMEM); - offset = avio_rb32(s->pb); avio_seek(s->pb, offset, SEEK_SET); avio_skip(s->pb, 4);