qtdemux: Fix stsc size check in qtdemux_merge_sample_table()
There are 3 32bit integers per entry and not one more for all but the last. Fixes a regression introduced in 5a9e80c01b4b49c6c7630a6d08b600114f38c0db when playing back files that have one sample table entry per audio sample. Merging the sample tables would've always failed because of the too strict size check and one audio sample per GStreamer buffer would've been output, which doesn't perform very well. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8657>
This commit is contained in:
parent
9a75d56cf8
commit
f795796f89
@ -10218,8 +10218,7 @@ qtdemux_merge_sample_table (GstQTDemux * qtdemux, QtDemuxStream * stream)
|
||||
num_chunks);
|
||||
|
||||
if (gst_byte_reader_get_remaining (&stream->stsc) <
|
||||
stream->n_samples_per_chunk * 3 * 4 +
|
||||
(stream->n_samples_per_chunk - 1) * 4) {
|
||||
stream->n_samples_per_chunk * 3 * 4) {
|
||||
GST_DEBUG_OBJECT (qtdemux, "Too small stsc");
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user