diff --git a/net/onvif/src/onvifmetadataoverlay/imp.rs b/net/onvif/src/onvifmetadataoverlay/imp.rs index df46e2b5..66333ce0 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 d7b89247..aeaeed44 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 { 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 => {