decodebin3: Fix global group-id handling
authorEdward Hervey <edward@centricular.com>
Wed, 11 Jan 2023 16:30:09 +0000 (17:30 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 11 Jan 2023 23:29:05 +0000 (23:29 +0000)
commit1fe99ebae185400609598fd6b2196148637e8727
treebf59c56b2abf54fbba6fd5d0e9d3984c2c38cb99
parent4f0abc32e789661bbae7a88a1236e96fdb12a207
decodebin3: Fix global group-id handling

The goal of the "global" group-id is to fix new inputs that do not come from the
same "source" as others. In order to ensure all "current" streams have the same
group-id we distribute the first valid group-id to all streams.

This commit fixes two issues with that:

* When inputs are unlinked they weren't always properly resetted (it would only
  work if parsebin is used, which is no longer the default in
  uridecodebin3/playbin3).

* When computing the global group-id, take into account unset
  group-id (i.e. GST_GROUP_ID_INVALID).

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1698

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3712>
subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c