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.
This commit is contained in:
Brendan McGrath 2024-03-29 18:09:05 +11:00 committed by Alexandre Julliard
parent 9e1f5f6d11
commit 752126d60e

View file

@ -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;