Improve error message in case of output file with no streams, dumping
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Mon, 17 Nov 2008 23:27:05 +0000 (23:27 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Mon, 17 Nov 2008 23:27:05 +0000 (23:27 +0000)
the empty file format representation and specifying the index number
of the output file.

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

ffmpeg.c

index d3a4ec26c3e94dead999f34dded6611165a14e86..2056efad2c65f71d42082e6bd909278e78b092b8 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1582,7 +1582,8 @@ static int av_encode(AVFormatContext **output_files,
     for(i=0;i<nb_output_files;i++) {
         os = output_files[i];
         if (!os->nb_streams) {
-            fprintf(stderr, "Output file does not contain any stream\n");
+            dump_format(output_files[i], i, output_files[i]->filename, 1);
+            fprintf(stderr, "Output file #%d does not contain any stream\n", i);
             av_exit(1);
         }
         nb_ostreams += os->nb_streams;