mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-26 05:21:00 +00:00
gtk4: Deactivate the context if we fail to fill_info
Avoid leaving the context activated if we end up erroring out. Similar to https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3492 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1001>
This commit is contained in:
parent
d9de2d3d7b
commit
37b0dab0e8
1 changed files with 10 additions and 0 deletions
|
@ -670,6 +670,16 @@ impl PaintableSink {
|
|||
"Failed to fill info on the GL Context: {}",
|
||||
&err
|
||||
);
|
||||
// Deactivate the context upon failure
|
||||
if let Err(err) = app_ctx_guard.as_ref().unwrap().activate(false) {
|
||||
gst::error!(
|
||||
CAT,
|
||||
imp: self,
|
||||
"Failed to deactivate the context after failing fill info: {}",
|
||||
&err
|
||||
);
|
||||
}
|
||||
|
||||
return Err(err);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue