From 957a28f23971fb9a7725c2ccb1568957644793ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 10 Jul 2023 19:45:17 +0300 Subject: [PATCH] webrtcsink: Set VP8/VP9 payloader based on payloader element factory name Instead of checking the encoder's name. There are more VP8/VP9 encoders than the ones from the vpx plugin. Part-of: --- net/webrtc/src/utils.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/webrtc/src/utils.rs b/net/webrtc/src/utils.rs index d80ad606..c3228252 100644 --- a/net/webrtc/src/utils.rs +++ b/net/webrtc/src/utils.rs @@ -582,8 +582,11 @@ impl Codec { .property("mtu", 1200_u32) .property("pt", pt); - if ["vp8enc", "vp9enc"].contains(&self.encoder_name().unwrap().as_str()) { - res = res.property_from_str("picture-id-mode", "15-bit"); + match info.payloader.name().as_str() { + "rtpvp8pay" | "rtpvp9pay" => { + res = res.property_from_str("picture-id-mode", "15-bit"); + } + _ => (), } res.build().unwrap()