修复c sdk获取视频帧flags信息不对的问题 (#1947)

This commit is contained in:
Mr. shengge 2022-09-09 11:05:42 +08:00 committed by GitHub
parent d853075175
commit 97320a264d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,16 +161,16 @@ API_EXPORT uint32_t API_CALL mk_frame_get_flags(mk_frame frame) {
auto &ref = *((Frame::Ptr *) frame); auto &ref = *((Frame::Ptr *) frame);
uint32_t ret = 0; uint32_t ret = 0;
if (ref->keyFrame()) { if (ref->keyFrame()) {
ret &= MK_FRAME_FLAG_IS_KEY; ret |= MK_FRAME_FLAG_IS_KEY;
} }
if (ref->configFrame()) { if (ref->configFrame()) {
ret &= MK_FRAME_FLAG_IS_CONFIG; ret |= MK_FRAME_FLAG_IS_CONFIG;
} }
if (ref->dropAble()) { if (ref->dropAble()) {
ret &= MK_FRAME_FLAG_DROP_ABLE; ret |= MK_FRAME_FLAG_DROP_ABLE;
} }
if (!ref->decodeAble()) { if (!ref->decodeAble()) {
ret &= MK_FRAME_FLAG_NOT_DECODE_ABLE; ret |= MK_FRAME_FLAG_NOT_DECODE_ABLE;
} }
return ret; return ret;
} }