ffmpeg_opt: Fix sync_ist
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 26 Jun 2015 10:37:28 +0000 (12:37 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 26 Jun 2015 10:41:43 +0000 (12:41 +0200)
This code was lost in 2663540821ee010edc7a47316b00a4745aaf973c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg_opt.c

index a746405..f7f6553 100644 (file)
@@ -2027,6 +2027,7 @@ loop_end:
                 if(o->    data_disable && ist->st->codec->codec_type == AVMEDIA_TYPE_DATA)
                     continue;
 
+                ost = NULL;
                 switch (ist->st->codec->codec_type) {
                 case AVMEDIA_TYPE_VIDEO:      ost = new_video_stream     (o, oc, src_idx); break;
                 case AVMEDIA_TYPE_AUDIO:      ost = new_audio_stream     (o, oc, src_idx); break;
@@ -2050,6 +2051,9 @@ loop_end:
                         exit_program(1);
                     }
                 }
+                if (ost)
+                    ost->sync_ist = input_streams[  input_files[map->sync_file_index]->ist_index
+                                                  + map->sync_stream_index];
             }
         }
     }