mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Prevent DTLS ARQ packet to dup play/publish
This commit is contained in:
parent
9ff8bff601
commit
69fc1ba711
1 changed files with 10 additions and 2 deletions
|
@ -2006,7 +2006,11 @@ srs_error_t SrsRtcSession::start_play()
|
|||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
srs_freep(player_);
|
||||
// If player is initialized, we think the session is started.
|
||||
// To prevent play multiple times for the DTLS ARQ packet.
|
||||
if (player_) {
|
||||
return err;
|
||||
}
|
||||
player_ = new SrsRtcPlayer(this, _srs_context->get_id());
|
||||
|
||||
uint32_t video_ssrc = 0;
|
||||
|
@ -2039,7 +2043,11 @@ srs_error_t SrsRtcSession::start_publish()
|
|||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
srs_freep(publisher_);
|
||||
// If publisher is initialized, we think the session is started.
|
||||
// To prevent publish multiple times for the DTLS ARQ packet.
|
||||
if (publisher_) {
|
||||
return err;
|
||||
}
|
||||
publisher_ = new SrsRtcPublisher(this);
|
||||
// Request PLI for exists players?
|
||||
//publisher_->request_keyframe();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue