From 88353d8cb264a4b10b6839f3f7e010a667acb78b Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 17 Apr 2023 09:28:43 +0200 Subject: [PATCH] qtdemux: Fix av1C parsing This is a regression introduced by https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3882 The av1c codec configuration parsing would always fail due to an off-by-one error, the content of an atom starting at offset 8 (i.e. the 9th byte) and not 9 (the 10th byte). Also introduce a break in order to not get stray warnings Part-of: --- subprojects/gst-plugins-good/gst/isomp4/qtdemux.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c index b9b1c3f..1449c67 100644 --- a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c +++ b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c @@ -12251,7 +12251,7 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) * rest: OBUs. */ - switch (av1_data[9]) { + switch (av1_data[8]) { case 0x81:{ guint8 pres_delay_field; @@ -12272,10 +12272,11 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) gst_caps_set_simple (entry->caps, "codec_data", GST_TYPE_BUFFER, buf, NULL); gst_buffer_unref (buf); + break; } default: - GST_WARNING ("Unknown version %d of av1C box", - av1_data[9]); + GST_WARNING ("Unknown version 0x%02x of av1C box", + av1_data[8]); break; } -- 2.7.4