rtsp-media: Try to get dynamic payloaders by name from their bin first
authorSebastian Dröge <sebastian@centricular.com>
Mon, 22 Jul 2019 16:32:43 +0000 (19:32 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 22 Jul 2019 16:44:28 +0000 (19:44 +0300)
commit446315b36c5c4c813abc9f22f6624ca1a58e13e2
tree8e79b7ab62b16e8366128ce75943ae6bea565316
parent507e6f1db276bfb51307eec12facefd73dd246c1
rtsp-media: Try to get dynamic payloaders by name from their bin first

First try "pay", then "pay_%s" (where %s == pad name). And only then
fall back to the code that simply takes the first payloader that is
found.

The current code usually works (but is racy) because it will always take
the payloader that was last added (due to g_list_prepend() when adding
elements) in pad-added and that's usually the correct one. But if a new
payloader is added between pad-added and us trying to get it, we would
get the wrong payloader.
gst/rtsp-server/rtsp-media-factory-uri.c
gst/rtsp-server/rtsp-media.c