70 lines
2.8 KiB
Diff
70 lines
2.8 KiB
Diff
From cbd659c58f3236596a47b45a2afe6130139cf661 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
|
|
Date: Thu, 26 Sep 2024 18:40:56 +0300
|
|
Subject: [PATCH] qtdemux: Fix debug output during trun parsing
|
|
|
|
Various integers are unsigned so print them as such. Also print the actual
|
|
allocation size if allocation fails, not only parts of it.
|
|
|
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8059>
|
|
---
|
|
gst/isomp4/qtdemux.c | 17 +++++++++--------
|
|
1 file changed, 9 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
|
|
index f71d04b..ba80392 100644
|
|
--- a/gst/isomp4/qtdemux.c
|
|
+++ b/gst/isomp4/qtdemux.c
|
|
@@ -3221,8 +3221,8 @@ qtdemux_parse_trun (GstQTDemux * qtdemux, GstByteReader * trun,
|
|
gint64 initial_offset;
|
|
gint32 min_ct = 0;
|
|
|
|
- GST_LOG_OBJECT (qtdemux, "parsing trun track-id %d; "
|
|
- "default dur %d, size %d, flags 0x%x, base offset %" G_GINT64_FORMAT ", "
|
|
+ GST_LOG_OBJECT (qtdemux, "parsing trun track-id %u; "
|
|
+ "default dur %u, size %u, flags 0x%x, base offset %" G_GINT64_FORMAT ", "
|
|
"decode ts %" G_GINT64_FORMAT, stream->track_id, d_sample_duration,
|
|
d_sample_size, d_sample_flags, *base_offset, decode_ts);
|
|
|
|
@@ -3250,7 +3250,7 @@ qtdemux_parse_trun (GstQTDemux * qtdemux, GstByteReader * trun,
|
|
/* note this is really signed */
|
|
if (!gst_byte_reader_get_int32_be (trun, &data_offset))
|
|
goto fail;
|
|
- GST_LOG_OBJECT (qtdemux, "trun data offset %d", data_offset);
|
|
+ GST_LOG_OBJECT (qtdemux, "trun data offset %u", data_offset);
|
|
/* default base offset = first byte of moof */
|
|
if (*base_offset == -1) {
|
|
GST_LOG_OBJECT (qtdemux, "base_offset at moof");
|
|
@@ -3272,7 +3272,7 @@ qtdemux_parse_trun (GstQTDemux * qtdemux, GstByteReader * trun,
|
|
|
|
GST_LOG_OBJECT (qtdemux, "running offset now %" G_GINT64_FORMAT,
|
|
*running_offset);
|
|
- GST_LOG_OBJECT (qtdemux, "trun offset %d, flags 0x%x, entries %d",
|
|
+ GST_LOG_OBJECT (qtdemux, "trun offset %u, flags 0x%x, entries %u",
|
|
data_offset, flags, samples_count);
|
|
|
|
if (flags & TR_FIRST_SAMPLE_FLAGS) {
|
|
@@ -3492,14 +3492,15 @@ fail:
|
|
}
|
|
out_of_memory:
|
|
{
|
|
- GST_WARNING_OBJECT (qtdemux, "failed to allocate %d samples",
|
|
- stream->n_samples);
|
|
+ GST_WARNING_OBJECT (qtdemux, "failed to allocate %u + %u samples",
|
|
+ stream->n_samples, samples_count);
|
|
return FALSE;
|
|
}
|
|
index_too_big:
|
|
{
|
|
- GST_WARNING_OBJECT (qtdemux, "not allocating index of %d samples, would "
|
|
- "be larger than %uMB (broken file?)", stream->n_samples,
|
|
+ GST_WARNING_OBJECT (qtdemux,
|
|
+ "not allocating index of %u + %u samples, would "
|
|
+ "be larger than %uMB (broken file?)", stream->n_samples, samples_count,
|
|
QTDEMUX_MAX_SAMPLE_INDEX_SIZE >> 20);
|
|
return FALSE;
|
|
}
|
|
--
|
|
2.33.0
|
|
|