From 3d24f1da223b65031c4bba8d36beee518ec3878f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 4 May 2021 14:31:58 +0300 Subject: [PATCH] closedcaption/cea608overlay: Fix compilation with cairo API changes --- video/closedcaption/src/cea608overlay/imp.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/video/closedcaption/src/cea608overlay/imp.rs b/video/closedcaption/src/cea608overlay/imp.rs index f78ebfd9..7fad6860 100644 --- a/video/closedcaption/src/cea608overlay/imp.rs +++ b/video/closedcaption/src/cea608overlay/imp.rs @@ -199,12 +199,12 @@ impl Cea608Overlay { ) .ok()?; - let cr = cairo::Context::new(&surface); + let cr = cairo::Context::new(&surface).ok()?; // Clear background cr.set_operator(cairo::Operator::Source); cr.set_source_rgba(0.0, 0.0, 0.0, 0.0); - cr.paint(); + cr.paint().ok()?; // Render text outline cr.save().ok()?; @@ -213,7 +213,7 @@ impl Cea608Overlay { cr.set_source_rgba(0.0, 0.0, 0.0, 1.0); pangocairo::functions::layout_path(&cr, &layout); - cr.stroke(); + cr.stroke().ok()?; cr.restore().ok()?; // Render text