Module: wine
Branch: master
Commit: 752126d60ef8249beee57b6d5f9f7ccde84d0d58
URL: https://gitlab.winehq.org/wine/wine/-/commit/752126d60ef8249beee57b6d5f9f7c…
Author: Brendan McGrath <bmcgrath(a)codeweavers.com>
Date: Fri Mar 29 18:09:05 2024 +1100
winegstreamer: Respond to the URI query.
The default behaviour for gstreamer is to use the URI to create the
stream-id. Without this, gstreamer creates a random stream-id per pad
which can cause inconsistent ordering on the decodebin src pads.
This in turn can cause issues, for example, with audio stream selection.
---
dlls/winegstreamer/wg_parser.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
index db16971cd4f..679500b617e 100644
--- a/dlls/winegstreamer/wg_parser.c
+++ b/dlls/winegstreamer/wg_parser.c
@@ -1244,6 +1244,15 @@ static gboolean src_query_cb(GstPad *pad, GstObject *parent, GstQuery *query)
gst_query_add_scheduling_mode(query, GST_PAD_MODE_PULL);
return TRUE;
+ case GST_QUERY_URI:
+ if (parser->uri)
+ {
+ GST_LOG_OBJECT(pad, "Responding with %" GST_PTR_FORMAT, query);
+ gst_query_set_uri(query, parser->uri);
+ return TRUE;
+ }
+ return FALSE;
+
default:
GST_WARNING("Unhandled query type %s.", GST_QUERY_TYPE_NAME(query));
return FALSE;