Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2023-01-23 11:46:38 +0300
committerSebastian Dröge <sebastian@centricular.com>2023-01-23 12:08:49 +0300
commit4b9392938ff0c4271bd45f22d673697db4ecac06 (patch)
tree447d1a4ab6eaa6f1fea07282ff849018f527fb4b /video/dav1d
parent407a367529f49da112f52e7c654d765bdaee8e22 (diff)
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/1058>
Diffstat (limited to 'video/dav1d')
-rw-r--r--video/dav1d/src/dav1ddec/imp.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/video/dav1d/src/dav1ddec/imp.rs b/video/dav1d/src/dav1ddec/imp.rs
index 9bd942228..62ed91966 100644
--- a/video/dav1d/src/dav1ddec/imp.rs
+++ b/video/dav1d/src/dav1ddec/imp.rs
@@ -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);