Skip to content

Commit

Permalink
WebRTC: fix h264 FU-A only one package
Browse files Browse the repository at this point in the history
  • Loading branch information
chai51 committed Nov 25, 2024
1 parent 7951bf3 commit 644443f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion trunk/src/app/srs_app_rtc_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1834,7 +1834,12 @@ srs_error_t SrsRtcFrameBuilder::packet_video_rtmp(const uint16_t start, const ui
if (fua_payload->start) {
nalu_len = fua_payload->size + 1;
//skip 4 bytes to write nalu_len future
payload.skip(4);
if (fua_payload->end) {
//only one FU-A
payload.write_4bytes(nalu_len);
} else {
payload.skip(4);
}
payload.write_1bytes(fua_payload->nri | fua_payload->nalu_type);
payload.write_bytes(fua_payload->payload, fua_payload->size);
} else {
Expand Down

0 comments on commit 644443f

Please sign in to comment.