Patch by Anton Khirnov <wyskas gmail com>. Originally committed as revision 22809 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -1914,7 +1914,7 @@ static int av_transcode(AVFormatContext **output_files, · 1913 unmodified lines | ||
| 1914 | 1914 | |
| 1915 | 1915 | /* for each output stream, we compute the right encoding parameters */ |
| 1916 | 1916 | for(i=0;i<nb_ostreams;i++) { |
| 1917 | − AVMetadataTag *t = NULL, *lang = NULL; | |
| 1917 | + AVMetadataTag *t = NULL; | |
| 1918 | 1918 | ost = ost_table[i]; |
| 1919 | 1919 | os = output_files[ost->file_index]; |
| 1920 | 1920 | ist = ist_table[ost->source_index]; |
| @@ -1922,12 +1922,8 @@ static int av_transcode(AVFormatContext **output_files, · 1 unmodified line | ||
| 1922 | 1922 | codec = ost->st->codec; |
| 1923 | 1923 | icodec = ist->st->codec; |
| 1924 | 1924 | |
| 1925 | − if (av_metadata_get(ist->st->metadata, "language", NULL, 0)) | |
| 1926 | − lang = av_metadata_get(ost->st->metadata, "language", NULL, 0); | |
| 1927 | 1925 | while ((t = av_metadata_get(ist->st->metadata, "", t, AV_METADATA_IGNORE_SUFFIX))) { |
| 1928 | − if (lang && !strcmp(t->key, "language")) | |
| 1929 | − continue; | |
| 1930 | − av_metadata_set2(&ost->st->metadata, t->key, t->value, 0); | |
| 1926 | + av_metadata_set2(&ost->st->metadata, t->key, t->value, AV_METADATA_DONT_OVERWRITE); | |
| 1931 | 1927 | } |
| 1932 | 1928 | |
| 1933 | 1929 | ost->st->disposition = ist->st->disposition; |