mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 03:41:55 +00:00
[rtc] *Fix Fua package bug(payload size minus one). (#2618)
* This can cause webrtc video PacketBuffer assemble corrupt when (nal size - 1) % 1300 == 0 * issues about webrtc all caused by this bug
This commit is contained in:
parent
6693c73a4c
commit
46adcfb6c9
1 changed files with 1 additions and 1 deletions
|
@ -1192,7 +1192,7 @@ srs_error_t SrsRtcFromRtmpBridger::package_fu_a(SrsSharedPtrMessage* msg, SrsSam
|
|||
uint8_t header = sample->bytes[0];
|
||||
uint8_t nal_type = header & kNalTypeMask;
|
||||
|
||||
int num_of_packet = 1 + (sample->size - 1) / fu_payload_size;
|
||||
int num_of_packet = 1 + (nb_left - 1) / fu_payload_size;
|
||||
for (int i = 0; i < num_of_packet; ++i) {
|
||||
int packet_size = srs_min(nb_left, fu_payload_size);
|
||||
|
||||
|
|
Loading…
Reference in a new issue