Skip to content

Commit

Permalink
Dvr: support h265 flv fragments.(ossrs#4280)
Browse files Browse the repository at this point in the history
  • Loading branch information
chundonglinlin committed Feb 23, 2025
1 parent 93cba24 commit 55241b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion trunk/src/app/srs_app_dvr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,13 @@ 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);

bool codec_ok = SrsFlvVideo::h264(payload, size);
#ifdef SRS_H265
codec_ok = codec_ok? true : SrsFlvVideo::hevc(payload, size);
#endif

bool is_key_frame = codec_ok && SrsFlvVideo::keyframe(payload, size) && !SrsFlvVideo::sh(payload, size);
if (!is_key_frame) {
return err;
}
Expand Down

0 comments on commit 55241b4

Please sign in to comment.