qtmux: Use existing helper function to create "und" language code

This commit is contained in:
Sebastian Dröge 2018-09-06 20:06:10 +03:00
parent 6720da07cf
commit d9b52d1f5e
2 changed files with 2 additions and 5 deletions

View file

@ -1154,8 +1154,7 @@ atom_mdhd_init (AtomMDHD * mdhd)
/* tempting as it may be to simply 0-initialize,
* that will have the demuxer (correctly) come up with 'eng' as language
* so explicitly specify undefined instead */
mdhd->language_code =
('u' - 0x60) * 0x400 + ('n' - 0x60) * 0x20 + ('d' - 0x60);
mdhd->language_code = language_code ("und");
mdhd->quality = 0;
}

View file

@ -6153,9 +6153,7 @@ gst_qt_mux_sink_event (GstCollectPads * pads, GstCollectData * data,
g_assert (qtpad);
if (qtpad->trak) {
/* https://developer.apple.com/library/mac/#documentation/QuickTime/QTFF/QTFFChap4/qtff4.html */
qtpad->trak->mdia.mdhd.language_code =
(iso_code[0] - 0x60) * 0x400 + (iso_code[1] - 0x60) * 0x20 +
(iso_code[2] - 0x60);
qtpad->trak->mdia.mdhd.language_code = language_code (iso_code);
}
}
g_free (code);