diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2022-10-17 20:02:02 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2022-10-17 20:02:02 +0300 |
commit | e17688a2daf06322eea226e2f2cc19ddbb525d6a (patch) | |
tree | 840175792d077e08a092f18b93c673ccf476d65b /video/closedcaption/src/cea608overlay/imp.rs | |
parent | 676b061af3ffc1bd8e78ff4cc6bddaeeb247f2d9 (diff) |
Update for pango API changes
Diffstat (limited to 'video/closedcaption/src/cea608overlay/imp.rs')
-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 aeaeed445..b4b56cc8b 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); |