summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-11 00:33:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-10-11 00:51:09 +0200
commita72bf5fd118831d547786e353bd1377ddcbc8073 (patch)
treefdd3f93ade8e70bef4debe8125acb0bae443c502 /ffmpeg.c
parent996c73490c29ed7502154ded70b24d9b6d228e2a (diff)
ffmpeg: set the source_index for trivial filter graphs
Fixes one testcase in Ticket2969 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index d7bcb78cc0..86b7162241 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2104,6 +2104,21 @@ static int transcode_init(void)
char error[1024];
int want_sdp = 1;
+ for (i = 0; i < nb_filtergraphs; i++) {
+ FilterGraph *fg = filtergraphs[i];
+ for (j = 0; j < fg->nb_outputs; j++) {
+ OutputFilter *ofilter = fg->outputs[j];
+ if (ofilter->ost->source_index >= 0)
+ continue;
+ if (fg->nb_inputs != 1)
+ continue;
+ for (k = nb_input_streams-1; k >= 0 ; k--)
+ if (fg->inputs[0]->ist == input_streams[k])
+ break;
+ ofilter->ost->source_index = k;
+ }
+ }
+
/* init framerate emulation */
for (i = 0; i < nb_input_files; i++) {
InputFile *ifile = input_files[i];