qtdemux: Ignore raw audio streams when adjusting seek
authorPiotr Brzeziński <piotr@centricular.com>
Thu, 29 Jun 2023 13:20:29 +0000 (15:20 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 15 Nov 2023 19:44:38 +0000 (19:44 +0000)
Because we treat raw audio chunks/samples as keyframes, they were interfering
with seek time adjustment.
Became apparent when the accompanying video stream was I-frame only,
for example ProRes.
Since raw audio streams can be seeked freely, it's fine to just ignore them here,
giving priority to the real keyframes in the video stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5674>

subprojects/gst-plugins-good/gst/isomp4/qtdemux.c

index efd48b145641129f6567b4005fe6d024b40c2e49..a202f919bf4052fdfe9d924dc5124dfcc5d369ad 100644 (file)
@@ -1144,6 +1144,10 @@ gst_qtdemux_adjust_seek (GstQTDemux * qtdemux, gint64 desired_time,
     if (CUR_STREAM (str)->sparse && !use_sparse)
       continue;
 
+    /* raw audio streams can be ignored as we can seek anywhere within them */
+    if (str->subtype == FOURCC_soun && str->need_clip)
+      continue;
+
     seg_idx = gst_qtdemux_find_segment (qtdemux, str, desired_time);
     GST_DEBUG_OBJECT (qtdemux, "align segment %d", seg_idx);