diff options
author | jstebbins <[email protected]> | 2011-04-08 17:44:16 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-04-08 17:44:16 +0000 |
commit | db4b25fc4de5db124cb2d771ca3369d9d9b36d61 (patch) | |
tree | 1e68dfbd2cd743bdd704b4ed99d897accb9de653 /libhb/muxmkv.c | |
parent | f20621c2d30ad805dfefcab335506f660a133ffe (diff) |
Use bibiliographic form of ISO-639-2 lang codes in muxmkv
The Mkvtoolnix developer claims that MKV only allows the bibliographic form
of ISO-639-2 lang codes: https://www.bunkus.org/bugzilla/show_bug.cgi?id=598
http://matroska.org/technical/specs/index.html#languages seems to confirm this.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3909 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/muxmkv.c')
-rw-r--r-- | libhb/muxmkv.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libhb/muxmkv.c b/libhb/muxmkv.c index aed5940b4..ddb0028d1 100644 --- a/libhb/muxmkv.c +++ b/libhb/muxmkv.c @@ -10,6 +10,7 @@ #include <ogg/ogg.h> #include "hb.h" +#include "lang.h" /* Scale factor to apply to timecodes to convert from HandBrake's * 1/90000s to nanoseconds as expected by libmkv */ @@ -51,7 +52,8 @@ static int MKVInit( hb_mux_object_t * m ) uint8_t need_fonts = 0; int avcC_len, i, j; ogg_packet *ogg_headers[3]; - mk_TrackConfig *track; + mk_TrackConfig *track; + iso639_lang_t *lang; track = calloc(1, sizeof(mk_TrackConfig)); @@ -249,7 +251,9 @@ static int MKVInit( hb_mux_object_t * m ) } track->flagEnabled = 1; track->trackType = MK_TRACK_AUDIO; - track->language = audio->config.lang.iso639_2; + // MKV lang codes should be ISO-639-2/B + lang = lang_for_code2( audio->config.lang.iso639_2 ); + track->language = lang->iso639_2b ? lang->iso639_2b : lang->iso639_2; track->extra.audio.samplingFreq = (float)audio->config.out.samplerate; if (audio->config.out.codec == HB_ACODEC_AC3_PASS || audio->config.out.codec == HB_ACODEC_DCA_PASS) @@ -332,10 +336,12 @@ static int MKVInit( hb_mux_object_t * m ) subtitle->mux_data = mux_data; mux_data->subtitle = 1; mux_data->sub_format = subtitle->format; - + track->flagEnabled = 1; track->trackType = MK_TRACK_SUBTITLE; - track->language = subtitle->iso639_2; + // MKV lang codes should be ISO-639-2/B + lang = lang_for_code2( subtitle->iso639_2 ); + track->language = lang->iso639_2b ? lang->iso639_2b : lang->iso639_2; mux_data->track = mk_createTrack(m->file, track); } |