video/gif: Update gif dependency to 0.11

This commit is contained in:
Sebastian Dröge 2020-09-22 14:40:07 +03:00
parent 3b5d9b7392
commit 6de1ca7ed3
2 changed files with 3 additions and 4 deletions

View file

@ -12,7 +12,7 @@ glib = { git = "https://github.com/gtk-rs/glib" }
gstreamer = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } gstreamer = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
gstreamer-video = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } gstreamer-video = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
gstreamer-check = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } gstreamer-check = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
gif = "0.10" gif = "0.11"
atomic_refcell = "0.1" atomic_refcell = "0.1"
once_cell = "1" once_cell = "1"

View file

@ -7,7 +7,6 @@
// except according to those terms. // except according to those terms.
use atomic_refcell::AtomicRefCell; use atomic_refcell::AtomicRefCell;
use gif::SetParameter;
use glib::subclass; use glib::subclass;
use glib::subclass::prelude::*; use glib::subclass::prelude::*;
use gst::subclass::prelude::*; use gst::subclass::prelude::*;
@ -123,8 +122,8 @@ impl State {
) )
.expect("Failed to initialize GIF encoder"); .expect("Failed to initialize GIF encoder");
match settings.repeat { match settings.repeat {
-1 => encoder.set(gif::Repeat::Infinite), -1 => encoder.set_repeat(gif::Repeat::Infinite),
_ => encoder.set(gif::Repeat::Finite(settings.repeat as u16)), _ => encoder.set_repeat(gif::Repeat::Finite(settings.repeat as u16)),
} }
.expect("Failed to configure encoder"); .expect("Failed to configure encoder");
self.context = Some(encoder); self.context = Some(encoder);