mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-08-03 14:49:04 +00:00
fix: wivrn conf default encoders array is empty; skip serializing if empty
This commit is contained in:
parent
9e330dc3e3
commit
5fe4524e83
1 changed files with 2 additions and 1 deletions
|
@ -123,6 +123,7 @@ pub struct WivrnConfig {
|
||||||
pub scale: Option<[f32; 2]>,
|
pub scale: Option<[f32; 2]>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub bitrate: Option<u32>,
|
pub bitrate: Option<u32>,
|
||||||
|
#[serde(skip_serializing_if = "Vec::is_empty")]
|
||||||
pub encoders: Vec<WivrnConfEncoder>,
|
pub encoders: Vec<WivrnConfEncoder>,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub application: Option<WivrnConfigApplication>,
|
pub application: Option<WivrnConfigApplication>,
|
||||||
|
@ -135,7 +136,7 @@ impl Default for WivrnConfig {
|
||||||
Self {
|
Self {
|
||||||
scale: Some([0.8, 0.8]),
|
scale: Some([0.8, 0.8]),
|
||||||
bitrate: Some(50000000),
|
bitrate: Some(50000000),
|
||||||
encoders: vec![WivrnConfEncoder::default()],
|
encoders: vec![],
|
||||||
application: None,
|
application: None,
|
||||||
tcp_only: false,
|
tcp_only: false,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue