From d6e1f9407a06fa3c4dfca9a2efc6916c60ea8e43 Mon Sep 17 00:00:00 2001 From: Eson Jia Date: Sat, 9 Mar 2024 16:37:31 +0800 Subject: [PATCH] issue #3904: fix not segment by time intervals in recording HEVC --- trunk/src/app/srs_app_dvr.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trunk/src/app/srs_app_dvr.cpp b/trunk/src/app/srs_app_dvr.cpp index 492c6f12fbe..d8cbeda9c68 100644 --- a/trunk/src/app/srs_app_dvr.cpp +++ b/trunk/src/app/srs_app_dvr.cpp @@ -876,6 +876,9 @@ srs_error_t SrsDvrSegmentPlan::update_duration(SrsSharedPtrMessage* msg) char* payload = msg->payload; int size = msg->size; bool is_key_frame = SrsFlvVideo::h264(payload, size) && SrsFlvVideo::keyframe(payload, size) && !SrsFlvVideo::sh(payload, size); +#ifdef SRS_H265 + is_key_frame = is_key_frame ? true: SrsFlvVideo::hevc(payload, size) && SrsFlvVideo::keyframe(payload, size) && !SrsFlvVideo::sh(payload, size); +#endif if (!is_key_frame) { return err; }