Closed w41203208 closed 6 months ago
I have same issue,too.
I have fixed this problem. Thank you!
How did you fix it? Could you share the details?
TRANS_BY_GPT4
I find that pkt pt no change to player track pt to in SrsRtcVideoSendTrack and SrsRtcAudioSendTrack on_rtp function, if player before publisher is happened.
Because below condition is no match, I do checking SrsSource and change player track media pt_of_publisher to be SrsSource pulisher's track media pt which is same ssrc with player track. Ensure below condition has excuted.
// Should update PT, because subscriber may use different PT to publisher.
if (track_desc_->media_ && pkt->header.get_payload_type() == track_desc_->media_->pt_of_publisher_) {
// If PT is media from publisher, change to PT of media for subscriber.
pkt->header.set_payload_type(track_desc_->media_->pt_);
} else if (track_desc_->red_ && pkt->header.get_payload_type() == track_desc_->red_->pt_of_publisher_) {
// If PT is RED from publisher, change to PT of RED for subscriber.
pkt->header.set_payload_type(track_desc_->red_->pt_);
} else {
// TODO: FIXME: Should update PT for RTX.
}
This is my temporary solution. And it can work.
Has this issue been resolved?
Should have been fixed.
Why happen problem when I playing before publishing on Unity platform, but on the website platform don't hanppen
Problem