diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2021-08-26 09:18:58 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2021-08-26 09:44:43 +0300 |
commit | 4a870af19ce3cbaef63c3d21c29467e05504e81b (patch) | |
tree | 6d8958e3dfad6efe65609ad2036f11ac657de552 /video/rspng/src/pngenc/imp.rs | |
parent | a8a3a6ec3eaeac2c3a15c7a5db3dd440ff16d3d2 (diff) |
Update various dependencies
Diffstat (limited to 'video/rspng/src/pngenc/imp.rs')
-rw-r--r-- | video/rspng/src/pngenc/imp.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/video/rspng/src/pngenc/imp.rs b/video/rspng/src/pngenc/imp.rs index 6d1829cda..dbe1e638e 100644 --- a/video/rspng/src/pngenc/imp.rs +++ b/video/rspng/src/pngenc/imp.rs @@ -124,8 +124,8 @@ impl State { gst_video::VideoFormat::Gray8 | gst_video::VideoFormat::Gray16Be => { png::ColorType::Grayscale } - gst_video::VideoFormat::Rgb => png::ColorType::RGB, - gst_video::VideoFormat::Rgba => png::ColorType::RGBA, + gst_video::VideoFormat::Rgb => png::ColorType::Rgb, + gst_video::VideoFormat::Rgba => png::ColorType::Rgba, _ => { gst_error!(CAT, "format is not supported yet"); unreachable!() @@ -333,6 +333,15 @@ 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, |