From b091de228501f053927e4bca8d570d0ccac45fc2 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 30 Aug 2011 14:57:54 +0200 Subject: [PATCH] Revert "Fix stream mapping regression" Subsequent cherry picks are based on code prior to this, thus this needs to be rebased on HEAD by a volunteer. This reverts commit b25d931a82c7b95b2f47e6759c9d9be7705d664b. --- ffmpeg.c | 41 +---------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/ffmpeg.c b/ffmpeg.c index 5a1651edff..d89a5bd981 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -1895,7 +1895,7 @@ static int transcode(OutputFile *output_files, InputFile *input_files, int nb_input_files) { - int ret = 0, i, j, k, n, nb_ostreams = 0, step; + int ret = 0, i, j, k, n, nb_ostreams = 0; AVFormatContext *is, *os; AVCodecContext *codec, *icodec; @@ -1906,8 +1906,6 @@ static int transcode(OutputFile *output_files, int want_sdp = 1; uint8_t no_packet[MAX_FILES]={0}; int no_packet_count=0; - int nb_frame_threshold[AVMEDIA_TYPE_NB]={0}; - int nb_streams[AVMEDIA_TYPE_NB]={0}; if (rate_emu) for (i = 0; i < nb_input_streams; i++) @@ -1929,43 +1927,6 @@ static int transcode(OutputFile *output_files, ost_table = av_mallocz(sizeof(OutputStream *) * nb_ostreams); if (!ost_table) goto fail; - - for(k=0;knb_streams;i++,n++) { - nb_streams[os->streams[i]->codec->codec_type]++; - } - } - for(step=1<<30; step; step>>=1){ - int found_streams[AVMEDIA_TYPE_NB]={0}; - for(j=0; jfile_index ].ctx; - skip=1; - for(pi=0; pinb_programs; pi++){ - AVProgram *p= f->programs[pi]; - if(p->id == opt_programid) - for(si=0; sinb_stream_indexes; si++){ - if(f->streams[ p->stream_index[si] ] == ist->st) - skip=0; - } - } - } - if (ist->discard && ist->st->discard != AVDISCARD_ALL && !skip - && nb_frame_threshold[ist->st->codec->codec_type] <= ist->st->codec_info_nb_frames){ - found_streams[ist->st->codec->codec_type]++; - } - } - for(j=0; j