diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/gtk.rs | 2 | ||||
| -rw-r--r-- | src/v4l2cairo.rs | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -215,7 +215,7 @@ pub fn main(src: impl Source + 'static) -> Result<glib::ExitCode>{ #[strong] apps, move |app, _| { activate(app, apps.clone()); - 0 + glib::ExitCode::SUCCESS } }); Ok(app.run()) diff --git a/src/v4l2cairo.rs b/src/v4l2cairo.rs index 50f1eb7..62a8fa1 100644 --- a/src/v4l2cairo.rs +++ b/src/v4l2cairo.rs @@ -9,6 +9,7 @@ use crate::color::yuv2rgb; use zune_jpeg::JpegDecoder as JpegDec; use zune_jpeg::zune_core::options::DecoderOptions as JpegOptions; use zune_jpeg::zune_core::colorspace::ColorSpace as JpegColorSpace; +use zune_jpeg::zune_core::bytestream::ZCursor as JpegCursor; use chrono::{DateTime, Local}; pub struct V4l2Cairo<T: v4l2abst::CaptStream>(T); @@ -55,7 +56,7 @@ impl<T: v4l2abst::CaptStream + Send + 'static> cgtk::Source for V4l2Cairo<T>{ .ok_or(anyhow!("jpeg not found"))?; let mut jpeg = JpegDec::new_with_options( - &buf[jindex..], + JpegCursor::new(&buf[jindex..]), JpegOptions::new_fast() .jpeg_set_out_colorspace(JpegColorSpace::BGRA)); let b = jpeg.decode()?; |
