Skip to content

Commit

Permalink
Send PLI when starting a paused stream
Browse files Browse the repository at this point in the history
  • Loading branch information
xadhoom committed Apr 21, 2021
1 parent ba71925 commit acaa528
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugins/janus_videoroom.c
Original file line number Diff line number Diff line change
Expand Up @@ -6881,12 +6881,19 @@ static void *janus_videoroom_handler(void *data) {
g_snprintf(error_cause, 512, "Already in as a subscriber on this handle");
janus_refcount_decrease(&subscriber->ref);
goto error;
} else if(!strcasecmp(request_text, "start")) {
} else if(!strcasecmp(request_text, "start")) {
/* Start/restart receiving the publisher streams */
if(subscriber->paused && msg->jsep == NULL) {
janus_videoroom_publisher *feed = subscriber->feed;

/* This is just resuming a paused stream, reset the RTP sequence numbers */
subscriber->context.a_seq_reset = TRUE;
subscriber->context.v_seq_reset = TRUE;

if(feed && feed->sdp && strstr(feed->sdp, "m=video")) {
/* Send a FIR */
janus_videoroom_reqpli(feed, "Subscriber start");
}
}
subscriber->paused = FALSE;
event = json_object();
Expand Down

0 comments on commit acaa528

Please sign in to comment.