diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/closedcaption/src/cea608overlay/imp.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/video/closedcaption/src/cea608overlay/imp.rs b/video/closedcaption/src/cea608overlay/imp.rs index aeaeed44..b4b56cc8 100644 --- a/video/closedcaption/src/cea608overlay/imp.rs +++ b/video/closedcaption/src/cea608overlay/imp.rs @@ -99,18 +99,8 @@ impl Cea608Overlay { fn recalculate_layout(&self, state: &mut State) -> Result<gst::FlowSuccess, gst::FlowError> { let video_info = state.video_info.as_ref().unwrap(); let fontmap = pangocairo::FontMap::new(); - let context = match fontmap.create_context() { - Some(context) => Ok(context), - None => { - gst::element_imp_error!( - self, - gst::LibraryError::Failed, - ["Failed to create font map context"] - ); - Err(gst::FlowError::Error) - } - }?; - context.set_language(&pango::Language::from_string("en_US")); + let context = fontmap.create_context(); + context.set_language(Some(&pango::Language::from_string("en_US"))); context.set_base_dir(pango::Direction::Ltr); let layout = pango::Layout::new(&context); layout.set_alignment(pango::Alignment::Left); |