mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-10 19:25:26 +00:00
pngenc: Don't recreate the encoder after every frame
Version 0.17.2 of the encoder allows again to encode frame after frame without creating a new encoder instance.
This commit is contained in:
parent
a132fdb8be
commit
21e8c6dcd1
2 changed files with 1 additions and 10 deletions
|
@ -10,7 +10,7 @@ description = "An PNG encoder/decoder written in pure Rust"
|
|||
[dependencies]
|
||||
gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
gst_video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
|
||||
png = "0.17"
|
||||
png = "0.17.2"
|
||||
once_cell = "1"
|
||||
parking_lot = "0.11"
|
||||
atomic_refcell = "0.1"
|
||||
|
|
|
@ -333,15 +333,6 @@ impl VideoEncoderImpl for PngEncoder {
|
|||
let mut state_guard = self.state.lock();
|
||||
let state = state_guard.as_mut().ok_or(gst::FlowError::NotNegotiated)?;
|
||||
|
||||
// FIXME: https://github.com/image-rs/image-png/issues/301
|
||||
{
|
||||
let settings = self.settings.lock();
|
||||
state.reset(*settings).map_err(|err| {
|
||||
err.log_with_object(element);
|
||||
gst::FlowError::Error
|
||||
})?;
|
||||
}
|
||||
|
||||
gst_debug!(
|
||||
CAT,
|
||||
obj: element,
|
||||
|
|
Loading…
Reference in a new issue