changeset 3218:d5b42f345638 libavformat

Recommit r12809 Log: 10l Setting AVFMTCTX_NOHEADER if streams<2 so phantom streams are found. fixes WELCOMETOBELGRADE.flv After seeking bug has been fixed.
author michael
date Mon, 14 Apr 2008 12:24:29 +0000
parents 71e9ee649f03
children ab2687cf6ad8
files flvdec.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flvdec.c	Mon Apr 14 12:22:23 2008 +0000
+++ b/flvdec.c	Mon Apr 14 12:24:29 2008 +0000
@@ -257,6 +257,10 @@
         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;
+
     if(flags & FLV_HEADER_FLAG_HASVIDEO){
         if(!create_stream(s, 0))
             return AVERROR(ENOMEM);