Dominique Leuenberger
734b5c1ece
+ appsink: fix timeout logic for gst_app_sink_try_pull_sample(). + appsrc: Fix use-after-free when making buffer / buffer-lists writable. + audiostreamalign: Don't report disconts for every buffer if alignment-threshold is too small. + decodebin3: Unify collection switching checks. + discoverer: - Don't print channel layout for more than 64 channels. - Make sure the missing elements details array is NULL-terminated in a thread-safe way. - Fix segfault in race condition adding a new uri. + id3v2: Don't try parsing extended header if not enough data is available. + glupload: dmabuf: Fix emulated tiled import. + gl: - cocoa: fix rendering artifacts in retina displays. - meson: Don't use libdrm_dep in cc.has_header(). + oggstream: fix invalid ogg_packet->packet accesses, address invalid writes CVE. + opusdec: Set at most 64 channels to NONE position. + playbin: Fix caps leak in get_n_common_capsfeatures(). + playbin3: ERROR when setting new HLS URI with instant-uri=true. + sdp: Add debug categories for message and mikey modules. + ssaparse: Search for closing brace after opening brace. + splitmuxsrc: Convert part reader to a bin with a non-async bus. + subparse: Check for NULL return of strchr() when parsing LRC subtitles. + streamsynchronizer: Only send GAP events out of source pads. + urisourcebin: Also use event probe for HLS use-cases. + video-converter: Set TIME segment format on appsrc. + vorbisdec: Set at most 64 channels to NONE position. + Translation for gst-plugins-base 1.24.0 not sync-ed with Translation Project. + Updated translations. OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/gstreamer-plugins-base?expand=0&rev=234
68 lines
2.2 KiB
Diff
68 lines
2.2 KiB
Diff
From 378e78f285a3f14c0c53473948090464fa48147b Mon Sep 17 00:00:00 2001
|
|
From: Edward Hervey <edward@centricular.com>
|
|
Date: Wed, 21 Aug 2024 16:29:03 +0200
|
|
Subject: [PATCH] decodebin3: Fix collection identity check
|
|
|
|
Collections can be auto-generated from upstream and yet have exactly the same
|
|
streams in it.
|
|
|
|
Therefore do a more in-depth check for equality.
|
|
|
|
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3742
|
|
---
|
|
.../gst/playback/gstdecodebin3.c | 26 ++++++++++++++++++-
|
|
1 file changed, 25 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/gst/playback/gstdecodebin3.c b/gst/playback/gstdecodebin3.c
|
|
index 56ef496468ac..78b79c776ba6 100644
|
|
--- a/gst/playback/gstdecodebin3.c
|
|
+++ b/gst/playback/gstdecodebin3.c
|
|
@@ -2609,6 +2609,29 @@ db_collection_new (GstStreamCollection * collection)
|
|
return db_collection;
|
|
}
|
|
|
|
+static gboolean
|
|
+collections_are_identical (GstStreamCollection * collection,
|
|
+ GstStreamCollection * previous)
|
|
+{
|
|
+ guint i;
|
|
+
|
|
+ if (collection == previous)
|
|
+ return TRUE;
|
|
+
|
|
+ if (gst_stream_collection_get_size (collection) !=
|
|
+ gst_stream_collection_get_size (previous))
|
|
+ return FALSE;
|
|
+
|
|
+ for (i = 0; i < gst_stream_collection_get_size (previous); i++) {
|
|
+ GstStream *stream = gst_stream_collection_get_stream (previous, i);
|
|
+ const gchar *sid = gst_stream_get_stream_id (stream);
|
|
+ if (!stream_in_collection (collection, (gchar *) sid))
|
|
+ return FALSE;
|
|
+ }
|
|
+
|
|
+ return TRUE;
|
|
+}
|
|
+
|
|
/** handle_stream_collection_locked:
|
|
* @dbin:
|
|
* @collection: (transfer none): The new collection for @input. Can be %NULL.
|
|
@@ -2683,12 +2706,13 @@ handle_stream_collection_locked (GstDecodebin3 * dbin,
|
|
if (dbin->input_collection) {
|
|
GstStreamCollection *previous = dbin->input_collection->collection;
|
|
|
|
- if (collection == previous) {
|
|
+ if (collections_are_identical (collection, previous)) {
|
|
GST_DEBUG_OBJECT (dbin, "Collection didn't change");
|
|
gst_object_unref (collection);
|
|
SELECTION_UNLOCK (dbin);
|
|
return NULL;
|
|
}
|
|
+
|
|
/* Check if this collection is an update of the previous one */
|
|
if (gst_stream_collection_get_size (collection) >
|
|
gst_stream_collection_get_size (previous)) {
|
|
--
|
|
GitLab
|
|
|