Make ffmpeg dump output format in case of codec type mismatch between
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Mon, 28 Jul 2008 21:54:12 +0000 (21:54 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Mon, 28 Jul 2008 21:54:12 +0000 (21:54 +0000)
an input stream and the corresponding output stream.

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

ffmpeg.c

index ba615b3481a7394ae39cb93f1a965b49b1927caa..62802ddc917c7f6a00ffbf04a4aa7ecdc248c905 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1597,6 +1597,8 @@ static int av_encode(AVFormatContext **output_files,
 
                 /* Sanity check that the stream types match */
                 if (ist_table[ost->source_index]->st->codec->codec_type != ost->st->codec->codec_type) {
+                    int i= ost->file_index;
+                    dump_format(output_files[i], i, output_files[i]->filename, 1);
                     fprintf(stderr, "Codec type mismatch for mapping #%d.%d -> #%d.%d\n",
                         stream_maps[n-1].file_index, stream_maps[n-1].stream_index,
                         ost->file_index, ost->index);