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

github.com/sdroege/gst-plugin-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/video
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 11:46:38 +0300
commite0e63dd4da91ac956db4306adf7c1d05593cadd8 (patch)
tree063adb0debec4869555a868799fbdb0dae9f1df3 /video
parent2c386fb792a08c3944c9272b361ed54acf86efc8 (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/1057>
Diffstat (limited to 'video')
-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 9bd94222..62ed9196 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);