mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-18 16:16:28 +00:00
webrtcsink: Set caps-change-mode=delayed on encoder capsfilter
Otherwise when changing the target caps (e.g. for reducing quality) there is a race condition between buffers between the converter elements and renegotiation. For example, videoconvertscale might've output a 1920x1080 buffer, then the capsfilter is configured to 1280x720, the buffer arrives in videorate, videorate notices that renegotiation is pending, tries to renegotiate and ends up with EMPTY caps because it can only change the framerate but not the resolution. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1949>
This commit is contained in:
parent
c3de9e5927
commit
f4d2bd1a5d
1 changed files with 1 additions and 0 deletions
|
@ -716,6 +716,7 @@ impl Codec {
|
||||||
|
|
||||||
gst::ElementFactory::make("capsfilter")
|
gst::ElementFactory::make("capsfilter")
|
||||||
.property("caps", &caps)
|
.property("caps", &caps)
|
||||||
|
.property_from_str("caps-change-mode", "delayed")
|
||||||
.build()
|
.build()
|
||||||
.with_context(|| "Creating capsfilter caps")
|
.with_context(|| "Creating capsfilter caps")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue