utils/fallbacksrc: Fix fallback stream detection if only audio or video is enabled

This commit is contained in:
Sebastian Dröge 2020-07-30 14:04:37 +03:00
parent 7a2c8768ad
commit 34fab8786f

View file

@ -2078,6 +2078,7 @@ impl FallbackSrc {
// is the fallback pad then we have the fallback activated.
(!have_audio && !have_video)
|| (have_audio
&& state.audio_stream.is_some()
&& state
.audio_stream
.as_ref()
@ -2091,6 +2092,7 @@ impl FallbackSrc {
.map(|p| p.get_name() == "fallback_sink")
.unwrap_or(true))
|| (have_video
&& state.video_stream.is_some()
&& state
.video_stream
.as_ref()