Skip to content

Commit

Permalink
issue ossrs#3904: fix not segment by time intervals in recording HEVC
Browse files Browse the repository at this point in the history
  • Loading branch information
Eson-Jia committed Mar 19, 2024
1 parent 954b1b7 commit 08c070e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions trunk/src/app/srs_app_dvr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 08c070e

Please sign in to comment.