mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-29 15:01:07 +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");
|
||||
Ok(std::ops::ControlFlow::Break(()))
|
||||
}
|
||||
Err(err) if err.is_again() => {
|
||||
Err(dav1d::Error::Again) => {
|
||||
gst::trace!(CAT, imp: self, "Decoder returned EAGAIN");
|
||||
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) => {
|
||||
gst::error!(CAT, "Sending data failed (error code: {})", err);
|
||||
self.obj().release_frame(frame);
|
||||
|
|
Loading…
Reference in a new issue