Fix hevc decode error "Could not find ref with POC" (#9960)

1. Dropping frames can cause this error, reset encoder when this
   happens.
2. There are some logic error for clear video queue, because video queue
   message is not cleared. This need to be fixed.

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2024-11-18 23:03:27 +08:00
committed by GitHub
parent 8b710f62c8
commit c5426b0fbc
4 changed files with 28 additions and 5 deletions

View File

@@ -15,7 +15,7 @@ use hbb_common::{
};
use hwcodec::{
common::{
DataFormat,
DataFormat, HwcodecErrno,
Quality::{self, *},
RateControl::{self, *},
},
@@ -31,6 +31,7 @@ const DEFAULT_PIXFMT: AVPixelFormat = AVPixelFormat::AV_PIX_FMT_NV12;
pub const DEFAULT_FPS: i32 = 30;
const DEFAULT_GOP: i32 = i32::MAX;
const DEFAULT_HW_QUALITY: Quality = Quality_Default;
pub const ERR_HEVC_POC: i32 = HwcodecErrno::HWCODEC_ERR_HEVC_COULD_NOT_FIND_POC as i32;
crate::generate_call_macro!(call_yuv, false);