mirror of
https://github.com/arut/nginx-rtmp-module.git
synced 2025-08-06 15:00:18 +08:00
implementing cutting off application arguments; they are sent again by players in play()
This commit is contained in:
2
TODO
2
TODO
@ -1,5 +1,7 @@
|
|||||||
- multiple tracks in vod/mp4
|
- multiple tracks in vod/mp4
|
||||||
|
|
||||||
|
- HLS problem on publish restart
|
||||||
|
|
||||||
|
|
||||||
- improve session epoch variable
|
- improve session epoch variable
|
||||||
|
|
||||||
|
@ -134,8 +134,8 @@ ngx_rtmp_cmd_connect(ngx_rtmp_session_t *s, ngx_rtmp_connect_t *v)
|
|||||||
ngx_rtmp_core_srv_conf_t *cscf;
|
ngx_rtmp_core_srv_conf_t *cscf;
|
||||||
ngx_rtmp_core_app_conf_t **cacfp;
|
ngx_rtmp_core_app_conf_t **cacfp;
|
||||||
ngx_uint_t n;
|
ngx_uint_t n;
|
||||||
size_t len;
|
|
||||||
ngx_rtmp_header_t h;
|
ngx_rtmp_header_t h;
|
||||||
|
u_char *p;
|
||||||
|
|
||||||
static double trans;
|
static double trans;
|
||||||
static double capabilities = NGX_RTMP_CAPABILITIES;
|
static double capabilities = NGX_RTMP_CAPABILITIES;
|
||||||
@ -229,16 +229,19 @@ ngx_rtmp_cmd_connect(ngx_rtmp_session_t *s, ngx_rtmp_connect_t *v)
|
|||||||
|
|
||||||
#undef NGX_RTMP_SET_STRPAR
|
#undef NGX_RTMP_SET_STRPAR
|
||||||
|
|
||||||
|
p = ngx_strlchr(s->app.data, s->app.data + s->app.len, '?');
|
||||||
|
if (p) {
|
||||||
|
s->app.len = (p - s->app.data);
|
||||||
|
}
|
||||||
|
|
||||||
s->acodecs = v->acodecs;
|
s->acodecs = v->acodecs;
|
||||||
s->vcodecs = v->vcodecs;
|
s->vcodecs = v->vcodecs;
|
||||||
|
|
||||||
/* find application & set app_conf */
|
/* find application & set app_conf */
|
||||||
len = ngx_strlen(v->app);
|
|
||||||
|
|
||||||
cacfp = cscf->applications.elts;
|
cacfp = cscf->applications.elts;
|
||||||
for(n = 0; n < cscf->applications.nelts; ++n, ++cacfp) {
|
for(n = 0; n < cscf->applications.nelts; ++n, ++cacfp) {
|
||||||
if ((*cacfp)->name.len == len
|
if ((*cacfp)->name.len == s->app.len &&
|
||||||
&& !ngx_strncmp((*cacfp)->name.data, v->app, len))
|
ngx_strncmp((*cacfp)->name.data, s->app.data, s->app.len) == 0)
|
||||||
{
|
{
|
||||||
/* found app! */
|
/* found app! */
|
||||||
s->app_conf = (*cacfp)->app_conf;
|
s->app_conf = (*cacfp)->app_conf;
|
||||||
@ -248,7 +251,7 @@ ngx_rtmp_cmd_connect(ngx_rtmp_session_t *s, ngx_rtmp_connect_t *v)
|
|||||||
|
|
||||||
if (s->app_conf == NULL) {
|
if (s->app_conf == NULL) {
|
||||||
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
|
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
|
||||||
"connect: application not found: '%s'", v->app);
|
"connect: application not found: '%V'", &s->app);
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user