mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-29 04:51:09 +00:00
Nullability fix for VideoFormat::to_string() in case Unknown is passed
This commit is contained in:
parent
0eb32f0483
commit
d3b03de9ff
1 changed files with 4 additions and 0 deletions
|
@ -83,6 +83,10 @@ impl ::VideoFormat {
|
|||
}
|
||||
|
||||
pub fn to_string<'a>(&self) -> &'a str {
|
||||
if *self == ::VideoFormat::Unknown {
|
||||
return "UNKNOWN";
|
||||
}
|
||||
|
||||
unsafe {
|
||||
CStr::from_ptr(ffi::gst_video_format_to_string(self.to_glib()))
|
||||
.to_str()
|
||||
|
|
Loading…
Reference in a new issue