Stop find_stream_info() searching for further streams if 2 streams have
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 13 Apr 2008 23:47:03 +0000 (23:47 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 13 Apr 2008 23:47:03 +0000 (23:47 +0000)
been found.

Originally committed as revision 12810 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/flvdec.c

index 34bc78d..1dd79f3 100644 (file)
@@ -324,6 +324,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
     if(i == s->nb_streams){
         av_log(NULL, AV_LOG_ERROR, "invalid stream\n");
         st= create_stream(s, is_audio);
+        s->ctx_flags &= ~AVFMTCTX_NOHEADER;
     }
 //    av_log(NULL, AV_LOG_DEBUG, "%d %X %d \n", is_audio, flags, st->discard);
     if(  (st->discard >= AVDISCARD_NONKEY && !((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY ||         is_audio))