Commit 68236bf6 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

mp4: correct language code value interpretation

Mac codes are only 0 to 0x3ff and 0x7fff.
parent 8f21af10
...@@ -2505,13 +2505,13 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track, ...@@ -2505,13 +2505,13 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
if( p_track->i_timescale == 0 ) if( p_track->i_timescale == 0 )
return; 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 ) ); strcpy( language, MP4_ConvertMacCode( p_mdhd->data.p_mdhd->i_language_code ) );
p_track->b_mac_encoding = true; p_track->b_mac_encoding = true;
} }
else if( p_mdhd->data.p_mdhd->i_language_code == 0x7fff )
p_track->b_mac_encoding = true;
else else
{ {
for( unsigned i = 0; i < 3; i++ ) for( unsigned i = 0; i < 3; i++ )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment