Commit 7442c1d45aca53de7582aff6b1e59787769aa463
1 parent
56fcdd82
视频流关键帧标记保存
Showing
1 changed file
with
7 additions
and
1 deletions
src/decoder/dvpp/DvppStreamDecoder.cpp
@@ -454,6 +454,12 @@ int DvppStreamDecoder::SendData(int videoType, char* data, int len, int isKey, u | @@ -454,6 +454,12 @@ int DvppStreamDecoder::SendData(int videoType, char* data, int len, int isKey, u | ||
454 | pkt->size = len; | 454 | pkt->size = len; |
455 | pkt->data = (uint8_t*)data; | 455 | pkt->data = (uint8_t*)data; |
456 | 456 | ||
457 | + if (isKey) { | ||
458 | + pkt->flags = 1; | ||
459 | + } else { | ||
460 | + pkt->flags = 0; | ||
461 | + } | ||
462 | + | ||
457 | do | 463 | do |
458 | { | 464 | { |
459 | int vdec_out_size = parse_stream_info(videoType, pkt); | 465 | int vdec_out_size = parse_stream_info(videoType, pkt); |
@@ -596,7 +602,7 @@ int DvppStreamDecoder::parse_stream_info(int videoType, AVPacket* pkt) { | @@ -596,7 +602,7 @@ int DvppStreamDecoder::parse_stream_info(int videoType, AVPacket* pkt) { | ||
596 | } while (0); | 602 | } while (0); |
597 | 603 | ||
598 | #ifdef USE_VILLAGE | 604 | #ifdef USE_VILLAGE |
599 | - bool bRet = m_recoderManager.init2(frame->width, frame->height, m_fps, avctx->bit_rate); | 605 | + bool bRet = m_recoderManager.init(frame->width, frame->height, m_fps, avctx->bit_rate); |
600 | if (!bRet){ | 606 | if (!bRet){ |
601 | LOG_ERROR("[{}]- m_recoderManager 初始化失败!", m_dec_name); | 607 | LOG_ERROR("[{}]- m_recoderManager 初始化失败!", m_dec_name); |
602 | } | 608 | } |