mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-02-13 11:27:33 +00:00
dav1ddec: Release input frames that immediately caused a decoding error
We're not going to get any output for them.
This commit is contained in:
parent
556b39332d
commit
730d0832ae
1 changed files with 3 additions and 2 deletions
|
@ -158,7 +158,7 @@ impl Dav1dDec {
|
|||
element: &super::Dav1dDec,
|
||||
state_guard: &mut MutexGuard<Option<State>>,
|
||||
input_buffer: gst::Buffer,
|
||||
frame: &gst_video::VideoCodecFrame,
|
||||
frame: gst_video::VideoCodecFrame,
|
||||
) -> Result<std::ops::ControlFlow<(), ()>, gst::FlowError> {
|
||||
gst_trace!(
|
||||
CAT,
|
||||
|
@ -192,6 +192,7 @@ impl Dav1dDec {
|
|||
}
|
||||
Err(err) => {
|
||||
gst_error!(CAT, "Sending data failed (error code: {})", err);
|
||||
element.release_frame(frame);
|
||||
return gst_video::video_decoder_error!(
|
||||
element,
|
||||
1,
|
||||
|
@ -574,7 +575,7 @@ impl VideoDecoderImpl for Dav1dDec {
|
|||
{
|
||||
let mut state_guard = self.state.lock().unwrap();
|
||||
state_guard = self.forward_pending_pictures(element, state_guard)?;
|
||||
if self.send_data(element, &mut state_guard, input_buffer, &frame)?
|
||||
if self.send_data(element, &mut state_guard, input_buffer, frame)?
|
||||
== std::ops::ControlFlow::Continue(())
|
||||
{
|
||||
loop {
|
||||
|
|
Loading…
Reference in a new issue