diff --git a/plugins/obs-outputs/librtmp/rtmp.c b/plugins/obs-outputs/librtmp/rtmp.c index 114af9e55..dccad0e74 100644 --- a/plugins/obs-outputs/librtmp/rtmp.c +++ b/plugins/obs-outputs/librtmp/rtmp.c @@ -2526,10 +2526,8 @@ PublisherAuth(RTMP *r, AVal *description) } else if(r->Link.pubUser.av_len && r->Link.pubPasswd.av_len) { - const char *mark = r->Link.app.av_val ? strstr(r->Link.app.av_val, "?") : NULL; pubToken.av_val = malloc(r->Link.pubUser.av_len + av_authmod_adobe.av_len + 8); - pubToken.av_len = sprintf(pubToken.av_val, "%s%s&user=%s", - mark != NULL ? "&" : "?", + pubToken.av_len = sprintf(pubToken.av_val, "?%s&user=%s", av_authmod_adobe.av_val, r->Link.pubUser.av_val); RTMP_Log(RTMP_LOGDEBUG, "%s, pubToken1: %s", __FUNCTION__, pubToken.av_val);