mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-26 21:41:03 +00:00
dav1ddec: Don't consider decoding errors as fatal
Instead use the `gst_video::video_decoder_error!` macro for allowing a certain number of consecutive errors before actually failing.
This commit is contained in:
parent
c35d1cdc0c
commit
6e28a17280
1 changed files with 13 additions and 6 deletions
|
@ -147,12 +147,19 @@ impl Dav1dDec {
|
||||||
let input_data = input_buffer
|
let input_data = input_buffer
|
||||||
.map_readable()
|
.map_readable()
|
||||||
.map_err(|_| gst::FlowError::Error)?;
|
.map_err(|_| gst::FlowError::Error)?;
|
||||||
let pictures = decoder
|
let pictures = match decoder.decode(input_data, frame_number, timestamp, duration, || {}) {
|
||||||
.decode(input_data, frame_number, timestamp, duration, || {})
|
Ok(pictures) => pictures,
|
||||||
.map_err(|e| {
|
Err(err) => {
|
||||||
gst_error!(CAT, "Decoding failed (error code: {})", e);
|
gst_error!(CAT, "Decoding failed (error code: {})", err);
|
||||||
gst::FlowError::Error
|
return gst_video::video_decoder_error!(
|
||||||
})?;
|
element,
|
||||||
|
1,
|
||||||
|
gst::StreamError::Decode,
|
||||||
|
["Decoding failed (error code {})", err]
|
||||||
|
)
|
||||||
|
.map(|_| vec![]);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
let mut decoded_pictures = vec![];
|
let mut decoded_pictures = vec![];
|
||||||
for pic in pictures {
|
for pic in pictures {
|
||||||
|
|
Loading…
Reference in a new issue