diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2023-01-22 01:27:22 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2023-01-22 01:27:22 +0300 |
commit | c5a625ae28e50d8b8695c97afb3077042bbe8619 (patch) | |
tree | d149f3e2c07af8c21943f43f30c9de5c54dbe46e /video | |
parent | d1109775809ab3da77dd9b1b31c3fcbaaea09e07 (diff) |
dav1d: Don't flush the decoder when draining
This directly discards all frames and it won't be possible to output
them anymore.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1055>
Diffstat (limited to 'video')
-rw-r--r-- | video/dav1d/src/dav1ddec/imp.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/video/dav1d/src/dav1ddec/imp.rs b/video/dav1d/src/dav1ddec/imp.rs index 66e43095..c9bad0a9 100644 --- a/video/dav1d/src/dav1ddec/imp.rs +++ b/video/dav1d/src/dav1ddec/imp.rs @@ -749,10 +749,8 @@ impl VideoDecoderImpl for Dav1dDec { gst::info!(CAT, imp: self, "Draining"); { - let mut state_guard = self.state.lock().unwrap(); + let state_guard = self.state.lock().unwrap(); if state_guard.is_some() { - let state = state_guard.as_mut().unwrap(); - self.flush_decoder(state); let _state_guard = self.forward_pending_pictures(state_guard, true)?; } } @@ -764,10 +762,8 @@ impl VideoDecoderImpl for Dav1dDec { gst::info!(CAT, imp: self, "Finishing"); { - let mut state_guard = self.state.lock().unwrap(); + let state_guard = self.state.lock().unwrap(); if state_guard.is_some() { - let state = state_guard.as_mut().unwrap(); - self.flush_decoder(state); let _state_guard = self.forward_pending_pictures(state_guard, true)?; } } |