From f825b7aba3de04c92e0b7c073a06eca9b3f7764e Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 3 Jul 2023 16:02:40 +0200 Subject: [PATCH] uridecodebin3: Refuse sub uri in gapless mode This is too problematic to handle properly right now. See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2550 and https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2605 Part-of: --- .../gst-plugins-base/gst/playback/gsturidecodebin3.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c b/subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c index c315a9bcbd..6470f5a071 100644 --- a/subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c +++ b/subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c @@ -1949,8 +1949,15 @@ gst_uri_decode_bin3_set_suburi (GstURIDecodeBin3 * dec, const gchar * uri) /* FIXME : Handle instant-uri-change. Should we just apply it automatically to * the current input item ? */ - item = next_inactive_play_item (dec); - play_item_set_suburi (item, uri); + if (dec->input_item->posted_about_to_finish) { + /* WARNING : Setting sub-uri in gapless mode is unreliable */ + GST_ELEMENT_WARNING (dec, CORE, NOT_IMPLEMENTED, + ("Setting sub-uri in gapless mode is not handled"), + ("Setting sub-uri in gapless mode is not implemented")); + } else { + item = next_inactive_play_item (dec); + play_item_set_suburi (item, uri); + } } /* Sync source handlers for the given play item. Might require creating/removing some