Revision c71591a5

View differences:

ffmpeg.c
1837 1837

  
1838 1838
    /* for each output stream, we compute the right encoding parameters */
1839 1839
    for(i=0;i<nb_ostreams;i++) {
1840
        AVMetadataTag *lang;
1840
        AVMetadataTag *t = NULL, *lang = NULL;
1841 1841
        ost = ost_table[i];
1842 1842
        os = output_files[ost->file_index];
1843 1843
        ist = ist_table[ost->source_index];
......
1845 1845
        codec = ost->st->codec;
1846 1846
        icodec = ist->st->codec;
1847 1847

  
1848
        if ((lang=av_metadata_get(ist->st->metadata, "language", NULL, 0))
1849
            &&   !av_metadata_get(ost->st->metadata, "language", NULL, 0))
1850
            av_metadata_set(&ost->st->metadata, "language", lang->value);
1848
        if (av_metadata_get(ist->st->metadata, "language", NULL, 0))
1849
            lang = av_metadata_get(ost->st->metadata, "language", NULL, 0);
1850
        while ((t = av_metadata_get(ist->st->metadata, "", t, AV_METADATA_IGNORE_SUFFIX))) {
1851
            if (lang && !strcmp(t->key, "language"))
1852
                continue;
1853
            av_metadata_set2(&ost->st->metadata, t->key, t->value, NULL);
1854
        }
1851 1855

  
1852 1856
        ost->st->disposition = ist->st->disposition;
1853 1857
        codec->bits_per_raw_sample= icodec->bits_per_raw_sample;

Also available in: Unified diff