[vlc-commits] [Git][videolan/vlc][master] demux: mp4: fix iTun reads
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Aug 15 10:06:20 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
cc116240 by François Cartegnie at 2026-08-15T09:37:33+00:00
demux: mp4: fix iTun reads
refs #29536
- - - - -
1 changed file:
- modules/demux/mp4/meta.c
Changes:
=====================================
modules/demux/mp4/meta.c
=====================================
@@ -411,13 +411,17 @@ static void iTUNTripletCallback( const char *psz_key,
{
struct qt_itunes_triplet_data data = {.type = iTunEncodingParams,
.EncodingParams = { 0 } };
- for( size_t i=0; i<p_data->i_blob; i += 8 )
+ const uint8_t *p_blob = p_data->p_blob;
+ size_t i_blob = p_data->i_blob;
+ while( i_blob >= 8 )
{
- const char *id = (const char*) &p_data->p_blob[i];
+ const char *id = (const char*) &p_blob[0];
+ const uint8_t *val = &p_blob[4];
if( !strncmp(id, "brat", 4) )
- data.EncodingParams.target_bitrate = GetDWBE(&p_data->p_blob[i+4]);
+ data.EncodingParams.target_bitrate = GetDWBE(val);
else if( !strncmp(id, "vbrq", 4) )
- data.EncodingParams.target_quality = GetDWBE(&p_data->p_blob[i+4]);
+ data.EncodingParams.target_quality = GetDWBE(val);
+ p_blob += 8; i_blob -= 8;
}
ctx->ituncb( &data, ctx->priv );
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/cc1162406b7d1ed45f9c51533651e9e1f8620e70
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/cc1162406b7d1ed45f9c51533651e9e1f8620e70
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list