Skip to content

Commit

Permalink
fix ngx_rtmp_kmp_track_init_frame sequence_header set for video
Browse files Browse the repository at this point in the history
  • Loading branch information
igorshevach committed May 5, 2024
1 parent c025815 commit b05730d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nginx-rtmp-kmp-module/src/ngx_rtmp_kmp_track.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ ngx_rtmp_kmp_track_init_frame(ngx_kmp_out_track_t *track,

has_pts_delay = 1;

if (packet_type == NGX_RTMP_AVC_SEQUENCE_HEADER) {
*sequence_header = 1;
}

} else {

frame_info &= ~NGX_RTMP_EXT_HEADER_MASK;
Expand Down Expand Up @@ -297,6 +301,11 @@ ngx_rtmp_kmp_track_init_frame(ngx_kmp_out_track_t *track,
default:
has_pts_delay = 0;
}

if (packet_type == NGX_RTMP_PKT_TYPE_SEQUENCE_START) {
*sequence_header = 1;
}

}

if ((frame_info >> 4) == NGX_RTMP_KEY_FRAME) {
Expand Down

0 comments on commit b05730d

Please sign in to comment.