From 7442c1d45aca53de7582aff6b1e59787769aa463 Mon Sep 17 00:00:00 2001 From: Hu Chunming <2657262686@qq.com> Date: Tue, 11 Jun 2024 11:12:11 +0800 Subject: [PATCH] 视频流关键帧标记保存 --- src/decoder/dvpp/DvppStreamDecoder.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/decoder/dvpp/DvppStreamDecoder.cpp b/src/decoder/dvpp/DvppStreamDecoder.cpp index 9e5b516..9a42e54 100644 --- a/src/decoder/dvpp/DvppStreamDecoder.cpp +++ b/src/decoder/dvpp/DvppStreamDecoder.cpp @@ -454,6 +454,12 @@ int DvppStreamDecoder::SendData(int videoType, char* data, int len, int isKey, u pkt->size = len; pkt->data = (uint8_t*)data; + if (isKey) { + pkt->flags = 1; + } else { + pkt->flags = 0; + } + do { int vdec_out_size = parse_stream_info(videoType, pkt); @@ -596,7 +602,7 @@ int DvppStreamDecoder::parse_stream_info(int videoType, AVPacket* pkt) { } while (0); #ifdef USE_VILLAGE - bool bRet = m_recoderManager.init2(frame->width, frame->height, m_fps, avctx->bit_rate); + bool bRet = m_recoderManager.init(frame->width, frame->height, m_fps, avctx->bit_rate); if (!bRet){ LOG_ERROR("[{}]- m_recoderManager 初始化失败!", m_dec_name); } -- libgit2 0.21.4