mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-08 18:25:30 +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
2c511fca50
commit
5a4c8b9fc8
1 changed files with 3 additions and 2 deletions
|
@ -149,7 +149,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,
|
||||
|
@ -183,6 +183,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,
|
||||
|
@ -554,7 +555,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