mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-05-09 22:11:08 +02:00
improved Envivio fix: now key length can be unfinalized with object
This commit is contained in:
parent
307245415b
commit
57a96ac2bc
|
@ -197,8 +197,15 @@ ngx_rtmp_amf_read_object(ngx_rtmp_amf_ctx_t *ctx, ngx_rtmp_amf_elt_t *elts,
|
|||
}
|
||||
#endif
|
||||
/* read key */
|
||||
if (ngx_rtmp_amf_get(ctx, buf, 2) != NGX_OK)
|
||||
switch (ngx_rtmp_amf_get(ctx, buf, 2)) {
|
||||
case NGX_DONE:
|
||||
/* Envivio sends unfinalized arrays */
|
||||
return NGX_OK;
|
||||
case NGX_OK:
|
||||
break;
|
||||
default:
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
ngx_rtmp_amf_reverse_copy(&len, buf, 2);
|
||||
|
||||
|
@ -229,14 +236,9 @@ ngx_rtmp_amf_read_object(ngx_rtmp_amf_ctx_t *ctx, ngx_rtmp_amf_elt_t *elts,
|
|||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
rc = ngx_rtmp_amf_get(ctx, &type, 1);
|
||||
|
||||
/* Envivo encoder does not finalize objects properly */
|
||||
if (rc == NGX_DONE) {
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
if (rc != NGX_OK || type != NGX_RTMP_AMF_END) {
|
||||
if (ngx_rtmp_amf_get(ctx, &type, 1) != NGX_OK
|
||||
|| type != NGX_RTMP_AMF_END)
|
||||
{
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue