[Ffmpeg-cvslog] r8277 - trunk/libavformat/flvdec.c

alex subversion
Wed Mar 7 02:52:08 CET 2007


Author: alex
Date: Wed Mar  7 02:52:08 2007
New Revision: 8277

Modified:
   trunk/libavformat/flvdec.c

Log:
workaround for broken flvtoolized files

Modified: trunk/libavformat/flvdec.c
==============================================================================
--- trunk/libavformat/flvdec.c	(original)
+++ trunk/libavformat/flvdec.c	Wed Mar  7 02:52:08 2007
@@ -230,6 +230,12 @@ static int flv_read_header(AVFormatConte
 
     url_fskip(&s->pb, 4);
     flags = get_byte(&s->pb);
+    /* old flvtool cleared this field */
+    /* FIXME: better fix needed */
+    if (!flags) {
+        flags = FLV_HEADER_FLAG_HASVIDEO | FLV_HEADER_FLAG_HASAUDIO;
+        av_log(s, AV_LOG_WARNING, "Broken FLV file, which says no streams present, this might fail\n");
+    }
 
     if(flags & FLV_HEADER_FLAG_HASVIDEO){
         st = av_new_stream(s, 0);




More information about the ffmpeg-cvslog mailing list