mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 12:09:31 +00:00
video: decoder: ffmpeg: handle INVALIDDATA in try_receive_frame()
The INVALIDDATA error can be returned by both try_send_packet() and try_receive_frame(). In both cases we should just skip the invalid input until the decoder can catch up with something that makes sense. TEST=arc.VideoDecodeAccel.h264_vm unconditionally passes on Hatch Change-Id: I4467b50c35fb36562a4b662d14071afcf02f1eb2 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3924583 Auto-Submit: Alexandre Courbot <acourbot@chromium.org> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org> Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@google.com> Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
This commit is contained in:
parent
b74bc68371
commit
753916a7d3
1 changed files with 5 additions and 0 deletions
|
@ -330,6 +330,11 @@ impl FfmpegDecoderSession {
|
|||
self.context.reset();
|
||||
Ok(false)
|
||||
}
|
||||
// If we got invalid data, keep going in hope that we will catch a valid state later.
|
||||
Err(AvError(AVERROR_INVALIDDATA)) => {
|
||||
warn!("Invalid data in stream, ignoring...");
|
||||
Ok(false)
|
||||
}
|
||||
Err(av_err) => {
|
||||
// This is a decoding error, so signal it using a `NotifyError` event to reflect the
|
||||
// same asynchronous flow as a hardware decoder would.
|
||||
|
|
Loading…
Reference in a new issue