diff --git a/ChangeLog b/ChangeLog index 0d8133e99..feddf94e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-09-29 Moritz Bunkus + + * mkvmerge, mmg's chapter editor: fixed the default value for the + »language« element if it isn't present in a chapter XML file. + 2014-09-28 Moritz Bunkus * MKVToolNix GUI: implemented drag & drop in the files pane. diff --git a/src/common/xml/ebml_chapters_converter.cpp b/src/common/xml/ebml_chapters_converter.cpp index 10ca7ad4b..ebe5b1f2e 100644 --- a/src/common/xml/ebml_chapters_converter.cpp +++ b/src/common/xml/ebml_chapters_converter.cpp @@ -137,7 +137,7 @@ ebml_chapters_converter_c::fix_display(KaxChapterDisplay &display) auto clanguage = FindChild(display); if (!clanguage) - display.PushElement((new KaxChapterLanguage)->SetValue("und")); + display.PushElement((new KaxChapterLanguage)->SetValue("eng")); else { int index = map_to_iso639_2_code(std::string(*clanguage)); diff --git a/tests/results.txt b/tests/results.txt index 4fdb1efee..20384b29a 100644 --- a/tests/results.txt +++ b/tests/results.txt @@ -285,3 +285,4 @@ T_436extract_ssa_extradata_after_events:8be4c4af0a2d65826071aee718ec44e8:passed: T_437ac3_from_avi_with_garbage:507ef5ec20f908215809174355f5c7f9:passed:20140908-144311:0.075599921 T_438pcm_in_vob:0d173f5729a8c71bbac72864d9aadbbc:passed:20140917-213731:1.216717009 T_439pcm_in_m2ts:ef7d3e60771a091c483a59245ab45e62-9a60138b0026ffe7447bba9d9ae55867:passed:20140917-222633:4.736872644 +T_440chapter_display_language_default_value:6dd844972d790ee741c58f5de5ff1555:passed:20140929-142306:0.021103552 diff --git a/tests/test-440chapter_display_language_default_value.rb b/tests/test-440chapter_display_language_default_value.rb new file mode 100755 index 000000000..a5c75249b --- /dev/null +++ b/tests/test-440chapter_display_language_default_value.rb @@ -0,0 +1,6 @@ +#!/usr/bin/ruby -w +# -*- coding: utf-8 -*- + +# T_440chapter_display_language_default_value +describe "mkvmerge / Default value for »language« element in chapter XML files" +test_merge "data/subtitles/srt/ven.srt", :args => "--chapters data/text/chaperts-no-language-element.xml"