Rocky <[email protected]> added the comment:

I think I fixed this bug. Here is what I changed:

Index: ffmpeg.c
===================================================================
--- ffmpeg.c    (revision 25590)
+++ ffmpeg.c    (working copy)
@@ -328,6 +328,8 @@
 static struct termios oldtty;
 #endif
 
+static AVOutputStream *new_output_stream(AVFormatContext *oc, int file_idx);
+
 #if CONFIG_AVFILTER
 
 static int configure_filters(AVInputStream *ist, AVOutputStream *ost)
@@ -642,8 +644,9 @@
     if (err < 0)
         return err;
     /* copy stream format */
-    s->nb_streams = ic->nb_streams;
+    s->nb_streams = 0;
     for(i=0;i<ic->nb_streams;i++) {
+       s->nb_streams++;
         AVStream *st;
         AVCodec *codec;
 
@@ -678,6 +681,8 @@
 
         if(st->codec->flags & CODEC_FLAG_BITEXACT)
             nopts = 1;
+
+        new_output_stream(s, nb_output_files);
     }
 
     if (!nopts)

________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue2317>
________________________________________________

Reply via email to