Revision 365515ac ffmpeg.c

View differences:

ffmpeg.c
1503 1503
    /* for each output stream, we compute the right encoding parameters */
1504 1504
    for(i=0;i<nb_ostreams;i++) {
1505 1505
        ost = ost_table[i];
1506
        os = output_files[ost->file_index];
1506 1507
        ist = ist_table[ost->source_index];
1507 1508

  
1508 1509
        codec = ost->st->codec;
......
1516 1517
            /* if stream_copy is selected, no need to decode or encode */
1517 1518
            codec->codec_id = icodec->codec_id;
1518 1519
            codec->codec_type = icodec->codec_type;
1519
            if(!codec->codec_tag) codec->codec_tag = icodec->codec_tag;
1520

  
1521
            if(!codec->codec_tag){
1522
                if(   !os->oformat->codec_tag
1523
                   || av_codec_get_id (os->oformat->codec_tag, icodec->codec_tag) > 0
1524
                   || av_codec_get_tag(os->oformat->codec_tag, icodec->codec_id) <= 0)
1525
                    codec->codec_tag = icodec->codec_tag;
1526
            }
1527

  
1520 1528
            codec->bit_rate = icodec->bit_rate;
1521 1529
            codec->extradata= icodec->extradata;
1522 1530
            codec->extradata_size= icodec->extradata_size;

Also available in: Unified diff