Commit 65be7a26 authored by Donald Campbell's avatar Donald Campbell Committed by Jean-Baptiste Kempf

MP4: support chapter titles in UTF-16

Close #17137
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent f8e2bd54
......@@ -1854,7 +1854,12 @@ static void LoadChapterApple( demux_t *p_demux, mp4_track_t *tk )
{
seekpoint_t *s = vlc_seekpoint_New();
s->psz_name = strndup( &p_buffer[2], i_len );
if( !memcmp( &p_buffer[2], "\xFF\xFE", 2 ) )
s->psz_name = FromCharset("UTF-16LE", &p_buffer[2], i_len);
else
s->psz_name = strndup( &p_buffer[2], i_len );
}
EnsureUTF8( s->psz_name );
s->i_time_offset = i_dts + __MAX( i_pts_delta, 0 );
......
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