Commit 1cddc222 by ziyue

修复h265关键帧判断逻辑bug

parent 821b0e4b
......@@ -70,7 +70,9 @@ public:
bool keyFrame() const override {
auto nal_ptr = (uint8_t *) this->data() + this->prefixSize();
auto type = H265_TYPE(*nal_ptr);
return (type == NAL_IDR_N_LP || type == NAL_IDR_W_RADL) && decodeAble();
// 参考自FFmpeg: IRAP VCL NAL unit types span the range
// [BLA_W_LP (16), RSV_IRAP_VCL23 (23)].
return (type >= NAL_BLA_W_LP && type <= NAL_RSV_IRAP_VCL23) && decodeAble() ;
}
bool configFrame() const override {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论