webrtcbin: consider pads with trans->codec_preferences ready
authorMathieu Duponchelle <mathieu@centricular.com>
Mon, 18 Oct 2021 13:23:48 +0000 (15:23 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 28 Oct 2021 19:05:59 +0000 (19:05 +0000)
.. when determining whether we can emit on-negotiation-needed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1233>

subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c

index 3fedee6..a241639 100644 (file)
@@ -1390,7 +1390,11 @@ _all_sinks_have_caps (GstWebRTCBin * webrtc)
     wpad = GST_WEBRTC_BIN_PAD (l->data);
     if (GST_PAD_DIRECTION (l->data) == GST_PAD_SINK && !wpad->received_caps
         && (!wpad->trans || !wpad->trans->stopped)) {
-      goto done;
+      if (wpad->trans && wpad->trans->codec_preferences) {
+        continue;
+      } else {
+        goto done;
+      }
     }
   }