qtdemux: Don't iterate over all trun entries if none of the flags are set

Nothing would be printed anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8059>
This commit is contained in:
Sebastian Dröge 2024-09-26 18:41:39 +03:00 committed by GStreamer Marge Bot
parent cbd659c58f
commit 0f4dae9b01

View file

@ -836,6 +836,11 @@ qtdemux_dump_trun (GstQTDemux * qtdemux, GstByteReader * data, int depth)
GST_LOG ("%*s first-sample-flags: %u", depth, "", first_sample_flags);
}
/* Nothing to print below */
if ((flags & (TR_SAMPLE_DURATION | TR_SAMPLE_SIZE | TR_SAMPLE_FLAGS |
TR_COMPOSITION_TIME_OFFSETS)) == 0)
return TRUE;
for (i = 0; i < samples_count; i++) {
if (flags & TR_SAMPLE_DURATION) {
if (!gst_byte_reader_get_uint32_be (data, &sample_duration))