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.
The first commit is a partial cherry-pick of eda34f74c6ad from Proton.