avconv: print an error message when demuxing fails.
authorAnton Khirnov <anton@khirnov.net>
Sun, 15 Jul 2012 22:22:05 +0000 (00:22 +0200)
committerAnton Khirnov <anton@khirnov.net>
Tue, 17 Jul 2012 07:50:26 +0000 (09:50 +0200)
Also exit in such a case if -xerror is used.

Fixes bug 329.

avconv.c

index 9df5bb3..7142ab4 100644 (file)
--- a/avconv.c
+++ b/avconv.c
@@ -3000,6 +3000,11 @@ static int transcode(void)
             continue;
         }
         if (ret < 0) {
+            if (ret != AVERROR_EOF) {
+                print_error(is->filename, ret);
+                if (exit_on_error)
+                    exit_program(1);
+            }
             input_files[file_index]->eof_reached = 1;
 
             for (i = 0; i < input_files[file_index]->nb_streams; i++) {