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>
This commit is contained in:
Sebastian Dröge 2023-01-22 00:27:22 +02:00
parent d110977580
commit c5a625ae28

View file

@ -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)?;
}
}