mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-02-20 14:46:24 +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: {}",
|
"Failed to fill info on the GL Context: {}",
|
||||||
&err
|
&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);
|
return Err(err);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue