[FFmpeg-devel] [PATCH] better reporting of programs

Nico Sabbi nicola_sabbi
Tue Oct 23 23:14:56 CEST 2007


hand-replied

Michael Niedermayer  wrote:
>> @@ -1476,6 +1501,14 @@
>>                  }
>>  
>>              } else {
>> +                if(opt_programid) {
>> +                    found = 0;
>> +                    j = stream_index_from_inputs(input_files, 
>nb_input_files, file_table, ost->st->codec->codec_type, 
>opt_programid);
>> +                    if(j != -1) {
>> +                        ost->source_index = j;
>> +                        found = 1;
>> +                    }
>> +                } else {

>wont this fail if there are more than 1 audio (or video) stream?

no, why? moreover it's the same code as in the block of the ordinary
selection


>why dont you just change the existing stream selection code to skip
>streams of non selected programs?

stream_index_from_inputs() does that:

AVProgram *program = ic->programs[p];
if(program->id != programid)
   continue;

there isn't any reverse mapping from a stream to the program enclosing
it that can simplify the code in the function I added




More information about the ffmpeg-devel mailing list