gtk4: Don't error out when the main context channel does not exist anymore when rendering

But instead return flushing to shut down silently.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1024>
This commit is contained in:
Sebastian Dröge 2022-12-22 20:45:21 +02:00 committed by GStreamer Marge Bot
parent 0c8e69ed7c
commit 30e501e7b0

View file

@ -440,12 +440,12 @@ impl VideoSinkImpl for PaintableSink {
let sender = self.sender.lock().unwrap();
let sender = sender.as_ref().ok_or_else(|| {
gst::error!(CAT, imp: self, "Have no main thread sender");
gst::FlowError::Error
gst::FlowError::Flushing
})?;
sender.send(SinkEvent::FrameChanged).map_err(|_| {
gst::error!(CAT, imp: self, "Have main thread receiver shut down");
gst::FlowError::Error
gst::FlowError::Flushing
})?;
Ok(gst::FlowSuccess::Ok)