1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

RTC: Fix bug for header parsing

This commit is contained in:
winlin 2021-02-05 17:05:46 +08:00
parent e17d20c8fa
commit fec088972d

View file

@ -1124,7 +1124,7 @@ srs_error_t SrsRtcPublishStream::on_rtp(char* data, int nb_data)
// Decode the header first. // Decode the header first.
SrsRtpHeader h; SrsRtpHeader h;
if (pt_to_drop_ && twcc_id_) { if (pt_to_drop_ || twcc_id_) {
SrsBuffer b(data, nb_data); SrsBuffer b(data, nb_data);
h.ignore_padding(true); h.set_extensions(&extension_types_); h.ignore_padding(true); h.set_extensions(&extension_types_);
if ((err = h.decode(&b)) != srs_success) { if ((err = h.decode(&b)) != srs_success) {