diff options
author | Vivia Nikolaidou <vivia@ahiru.eu> | 2022-10-14 18:11:36 +0300 |
---|---|---|
committer | Vivia Nikolaidou <vivia@ahiru.eu> | 2022-10-14 18:12:33 +0300 |
commit | 0ab965335ff268048abc9b90845716ff814b7ef7 (patch) | |
tree | b8f19b2a179644095c3eaae39de3891053384da1 | |
parent | f11b0fa5eb0d294f09d4dda7a052cf647f254688 (diff) |
onvifmetadataoverlay, cea608overlay: Fix pangocairo::FontMap::new()
It doesn't return an Option anymore.
-rw-r--r-- | net/onvif/src/onvifmetadataoverlay/imp.rs | 13 | ||||
-rw-r--r-- | video/closedcaption/src/cea608overlay/imp.rs | 12 |
2 files changed, 2 insertions, 23 deletions
diff --git a/net/onvif/src/onvifmetadataoverlay/imp.rs b/net/onvif/src/onvifmetadataoverlay/imp.rs index df46e2b55..66333ce09 100644 --- a/net/onvif/src/onvifmetadataoverlay/imp.rs +++ b/net/onvif/src/onvifmetadataoverlay/imp.rs @@ -293,18 +293,7 @@ impl OnvifMetadataOverlay { } if state.layout.is_none() { - let fontmap = match pangocairo::FontMap::new() { - Some(fontmap) => Ok(fontmap), - None => { - gst::element_imp_error!( - self, - gst::LibraryError::Failed, - ["Failed to create pangocairo font map"] - ); - Err(gst::FlowError::Error) - } - } - .unwrap(); + let fontmap = pangocairo::FontMap::new(); let context = match fontmap.create_context() { Some(context) => Ok(context), None => { diff --git a/video/closedcaption/src/cea608overlay/imp.rs b/video/closedcaption/src/cea608overlay/imp.rs index d7b892477..aeaeed445 100644 --- a/video/closedcaption/src/cea608overlay/imp.rs +++ b/video/closedcaption/src/cea608overlay/imp.rs @@ -98,17 +98,7 @@ impl Cea608Overlay { // TODO: switch to the API presented in this post once it's been exposed fn recalculate_layout(&self, state: &mut State) -> Result<gst::FlowSuccess, gst::FlowError> { let video_info = state.video_info.as_ref().unwrap(); - let fontmap = match pangocairo::FontMap::new() { - Some(fontmap) => Ok(fontmap), - None => { - gst::element_imp_error!( - self, - gst::LibraryError::Failed, - ["Failed to create pangocairo font map"] - ); - Err(gst::FlowError::Error) - } - }?; + let fontmap = pangocairo::FontMap::new(); let context = match fontmap.create_context() { Some(context) => Ok(context), None => { |