Commit 5a1cf7db authored by Francois Cartegnie's avatar Francois Cartegnie Committed by Jean-Baptiste Kempf

demux: mp4: workaround for broken stsz (twos sample)

refs issues/no-sound-tv.mov

(cherry picked from commit 6e5228fdf9bedb1758577fba555a7e52321e48b5)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent bbecde2e
......@@ -3494,6 +3494,9 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp
(*pi_nb_samples)++;
if ( p_track->i_sample_size == 0 )
i_size += p_track->p_sample_size[i];
/* broken stsz sample size == 1 */
else if ( p_track->i_sample_size == 1 && p_soun->i_samplesize > p_track->i_sample_size * 8 )
i_size += p_soun->i_samplesize * p_soun->i_channelcount / 8;
else
i_size += p_track->i_sample_size;
if ( *pi_nb_samples == QT_V0_MAX_SAMPLES )
......
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