mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
gst/qtdemux/qtdemux.c: use the correct variable to check if we can calculate the last chunk. Looks like an obvious b...
Original commit message from CVS: * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header), (qtdemux_parse_trak): use the correct variable to check if we can calculate the last chunk. Looks like an obvious bug, and makes the dump of offsets comparable to other tools
This commit is contained in:
parent
54a95b0f9f
commit
577775354d
2 changed files with 14 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2006-02-07 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
* gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header),
|
||||||
|
(qtdemux_parse_trak):
|
||||||
|
use the correct variable to check if we can calculate
|
||||||
|
the last chunk. Looks like an obvious bug, and makes
|
||||||
|
the dump of offsets comparable to other tools
|
||||||
|
|
||||||
2006-02-07 Thomas Vander Stichele <thomas at apestaart dot org>
|
2006-02-07 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header),
|
* gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header),
|
||||||
|
|
|
@ -2357,7 +2357,10 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
|
||||||
int samples_per_chunk;
|
int samples_per_chunk;
|
||||||
|
|
||||||
first_chunk = QTDEMUX_GUINT32_GET (stsc->data + 16 + i * 12 + 0) - 1;
|
first_chunk = QTDEMUX_GUINT32_GET (stsc->data + 16 + i * 12 + 0) - 1;
|
||||||
if (i == n_samples - 1) {
|
/* the last chunk of each entry is calculated by taking the first chunk
|
||||||
|
* of the next entry; except if there is no next, where we fake it with
|
||||||
|
* INT_MAX */
|
||||||
|
if (i == n_samples_per_chunk - 1) {
|
||||||
last_chunk = INT_MAX;
|
last_chunk = INT_MAX;
|
||||||
} else {
|
} else {
|
||||||
last_chunk = QTDEMUX_GUINT32_GET (stsc->data + 16 + i * 12 + 12) - 1;
|
last_chunk = QTDEMUX_GUINT32_GET (stsc->data + 16 + i * 12 + 12) - 1;
|
||||||
|
@ -2365,8 +2368,8 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
|
||||||
samples_per_chunk = QTDEMUX_GUINT32_GET (stsc->data + 16 + i * 12 + 4);
|
samples_per_chunk = QTDEMUX_GUINT32_GET (stsc->data + 16 + i * 12 + 4);
|
||||||
|
|
||||||
GST_LOG_OBJECT (qtdemux,
|
GST_LOG_OBJECT (qtdemux,
|
||||||
"sample %d has first_chunk %d, last_chunk %d, samples_per_chunk %d",
|
"entry %d has first_chunk %d, last_chunk %d, samples_per_chunk %d", i,
|
||||||
i, first_chunk, last_chunk, samples_per_chunk);
|
first_chunk, last_chunk, samples_per_chunk);
|
||||||
|
|
||||||
for (j = first_chunk; j < last_chunk; j++) {
|
for (j = first_chunk; j < last_chunk; j++) {
|
||||||
guint64 chunk_offset;
|
guint64 chunk_offset;
|
||||||
|
|
Loading…
Reference in a new issue