avconv: skip attached files when selecting streams to read from.
authorAnton Khirnov <anton@khirnov.net>
Fri, 15 Mar 2013 07:54:27 +0000 (08:54 +0100)
committerAnton Khirnov <anton@khirnov.net>
Fri, 15 Mar 2013 07:58:11 +0000 (08:58 +0100)
Fixes Bug 473 / invalid reads when using -attach.

avconv.c

index df86b2b..90b72fd 100644 (file)
--- a/avconv.c
+++ b/avconv.c
@@ -2704,6 +2704,8 @@ static int transcode(OutputFile *output_files,
             double  opts;
             ost = &output_streams[i];
             of = &output_files[ost->file_index];
+            if (ost->source_index < 0)
+                continue;
             os = output_files[ost->file_index].ctx;
             ist = &input_streams[ost->source_index];
             if (ost->is_past_recording_time || no_packet[ist->file_index] ||