qtdemux: Not considering sample size when calculating size of chunk.
Submitted by wes..@..il.com
Link to original bug (#770678)
Description
The size of chunk is not taking into account the size of samples. Some mp4 files have stream->sample_size != 1. When this occurs they will not play audio. If stream->sample_size is 1 the current code works.
What I'm proposing is a change here to lines: 7799/7800
if (stream->samples_per_frame * stream->bytes_per_frame) {
cur->size =
-
(stream->samples_per_chunk * stream->n_channels) /
-
stream->samples_per_frame * stream->bytes_per_frame;
-
((stream->samples_per_chunk * stream->n_channels) /
-
stream->samples_per_frame) * stream->bytes_per_frame * stream->sample_size; } else { cur->size = stream->samples_per_chunk; }