common: fix default value for chapter display language if missing from XML

This commit is contained in:
Moritz Bunkus 2014-09-29 14:24:08 +02:00
parent dfe4226c27
commit 3c9a9c4737
4 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2014-09-29 Moritz Bunkus <moritz@bunkus.org>
* 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 <moritz@bunkus.org>
* MKVToolNix GUI: implemented drag & drop in the files pane.

View File

@ -137,7 +137,7 @@ ebml_chapters_converter_c::fix_display(KaxChapterDisplay &display)
auto clanguage = FindChild<KaxChapterLanguage>(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));

View File

@ -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

View File

@ -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"