From d9b52d1f5e0887111249de20190a087f4285c926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 6 Sep 2018 20:06:10 +0300 Subject: [PATCH] qtmux: Use existing helper function to create "und" language code --- gst/isomp4/atoms.c | 3 +-- gst/isomp4/gstqtmux.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/gst/isomp4/atoms.c b/gst/isomp4/atoms.c index aa81dbcc53..8e53eab862 100644 --- a/gst/isomp4/atoms.c +++ b/gst/isomp4/atoms.c @@ -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; } diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c index cf8148d513..fafd94bf9a 100644 --- a/gst/isomp4/gstqtmux.c +++ b/gst/isomp4/gstqtmux.c @@ -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);