mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-10-31 22:58:51 +00:00
dav1d: Don't treat any kind of bitstream error immediately as fatal
Instead use the videodecoder error handling to allow up to max-errors consecutive decoding errors, i.e. infinite by default in 1.22 and newer. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1057>
This commit is contained in:
parent
2c386fb792
commit
e0e63dd4da
1 changed files with 11 additions and 1 deletions
|
@ -208,10 +208,20 @@ impl Dav1dDec {
|
||||||
gst::trace!(CAT, imp: self, "Decoder returned OK");
|
gst::trace!(CAT, imp: self, "Decoder returned OK");
|
||||||
Ok(std::ops::ControlFlow::Break(()))
|
Ok(std::ops::ControlFlow::Break(()))
|
||||||
}
|
}
|
||||||
Err(err) if err.is_again() => {
|
Err(dav1d::Error::Again) => {
|
||||||
gst::trace!(CAT, imp: self, "Decoder returned EAGAIN");
|
gst::trace!(CAT, imp: self, "Decoder returned EAGAIN");
|
||||||
Ok(std::ops::ControlFlow::Continue(()))
|
Ok(std::ops::ControlFlow::Continue(()))
|
||||||
}
|
}
|
||||||
|
Err(dav1d::Error::InvalidArgument) => {
|
||||||
|
gst::trace!(CAT, imp: self, "Decoder returned EINVAL");
|
||||||
|
gst_video::video_decoder_error!(
|
||||||
|
&*self.obj(),
|
||||||
|
1,
|
||||||
|
gst::LibraryError::Encode,
|
||||||
|
["Bitstream error"]
|
||||||
|
)?;
|
||||||
|
Ok(std::ops::ControlFlow::Continue(()))
|
||||||
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
gst::error!(CAT, "Sending data failed (error code: {})", err);
|
gst::error!(CAT, "Sending data failed (error code: {})", err);
|
||||||
self.obj().release_frame(frame);
|
self.obj().release_frame(frame);
|
||||||
|
|
Loading…
Reference in a new issue