[vlc-commits] mp4: correct language code value interpretation

Rémi Denis-Courmont git at videolan.org
Tue Apr 16 22:17:02 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Apr 16 23:16:28 2013 +0300| [68236bf636320e78a60e8d2dbc353b5d91978ee0] | committer: Rémi Denis-Courmont

mp4: correct language code value interpretation

Mac codes are only 0 to 0x3ff and 0x7fff.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=68236bf636320e78a60e8d2dbc353b5d91978ee0
---

 modules/demux/mp4/mp4.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 236f053..fb80fe5 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -2505,13 +2505,13 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
     if( p_track->i_timescale == 0 )
         return;
 
-    if( p_mdhd->data.p_mdhd->i_language_code < 0x800 )
+    if( p_mdhd->data.p_mdhd->i_language_code < 0x400 )
     {
-        /* We can convert i_language_code into iso 639 code,
-         * I won't */
         strcpy( language, MP4_ConvertMacCode( p_mdhd->data.p_mdhd->i_language_code ) );
         p_track->b_mac_encoding = true;
     }
+    else if( p_mdhd->data.p_mdhd->i_language_code == 0x7fff )
+        p_track->b_mac_encoding = true;
     else
     {
         for( unsigned i = 0; i < 3; i++ )



More information about the vlc-commits mailing list