Skip to content

Commit 2d1f414

Browse files
committed
[bug fix] stream conver publisher trigger relay push twice
1 parent a0d60a0 commit 2d1f414

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ngx_live_relay.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ ngx_live_relay_publish(ngx_rtmp_session_t *s, ngx_rtmp_publish_t *v)
206206
{
207207
ngx_live_relay_ctx_t *ctx;
208208

209+
// second publish will not trigger push
210+
if (s->live_stream->publish_ctx->next != NULL) {
211+
goto next;
212+
}
213+
209214
if (ngx_live_push(s) != NGX_OK) {
210215
return NGX_ERROR;
211216
}

0 commit comments

Comments
 (0)