diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-09-01 16:20:58 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-09-11 09:13:29 +0200 |
commit | ee0dadc1092cc097356daf967840faa0811409b1 (patch) | |
tree | 0a3bc786dde55dbff60d26f5bae60e0f0b8e6b84 /libavformat/flvdec.c | |
parent | 0697d81269ab07d91b3303923a4751c21c675439 (diff) | |
download | ffmpeg-ee0dadc1092cc097356daf967840faa0811409b1.tar.gz |
flvdec: always set AVFMTCTX_NOHEADER.
New streams may be created at any time, e.g. on codec change.
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r-- | libavformat/flvdec.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 084d012a61..868cc6b793 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -501,9 +501,7 @@ static int flv_read_header(AVFormatContext *s) av_log(s, AV_LOG_WARNING, "Broken FLV file, which says no streams present, this might fail\n"); } - if((flags & (FLV_HEADER_FLAG_HASVIDEO|FLV_HEADER_FLAG_HASAUDIO)) - != (FLV_HEADER_FLAG_HASVIDEO|FLV_HEADER_FLAG_HASAUDIO)) - s->ctx_flags |= AVFMTCTX_NOHEADER; + s->ctx_flags |= AVFMTCTX_NOHEADER; if(flags & FLV_HEADER_FLAG_HASVIDEO){ if(!create_stream(s, AVMEDIA_TYPE_VIDEO)) @@ -714,7 +712,6 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) if(i == s->nb_streams){ st = create_stream(s, is_audio ? AVMEDIA_TYPE_AUDIO : AVMEDIA_TYPE_VIDEO); - s->ctx_flags &= ~AVFMTCTX_NOHEADER; } av_dlog(s, "%d %X %d \n", is_audio, flags, st->discard); if( (st->discard >= AVDISCARD_NONKEY && !((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY || is_audio)) |