mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-06-28 16:09:00 +02:00
Fix sending messages
This commit is contained in:
parent
1c57ac07c9
commit
6a5398058d
|
@ -234,11 +234,15 @@ ngx_rtmp_bandwidth_detection_start(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
|
||||||
ngx_rtmp_bandwidth_detection_ctx_t *bw_ctx;
|
ngx_rtmp_bandwidth_detection_ctx_t *bw_ctx;
|
||||||
ngx_rtmp_live_ctx_t *lv_ctx;
|
ngx_rtmp_live_ctx_t *lv_ctx;
|
||||||
|
|
||||||
|
static struct {
|
||||||
|
double trans;
|
||||||
|
} v;
|
||||||
|
|
||||||
static ngx_rtmp_amf_elt_t in_elts[] = {
|
static ngx_rtmp_amf_elt_t in_elts[] = {
|
||||||
|
|
||||||
{ NGX_RTMP_AMF_NUMBER,
|
{ NGX_RTMP_AMF_NUMBER,
|
||||||
ngx_null_string,
|
ngx_null_string,
|
||||||
"checkBandwidth", 0 },
|
&v.trans, 0 },
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1024,7 +1024,10 @@ ngx_rtmp_create_bwcheck(ngx_rtmp_session_t *s, u_char *payload)
|
||||||
sizeof(out_inf) },
|
sizeof(out_inf) },
|
||||||
};
|
};
|
||||||
|
|
||||||
out_inf[0].data = payload;
|
if (payload != NULL) {
|
||||||
|
out_inf[0].data = payload;
|
||||||
|
out_inf[0].len = ngx_strlen(payload);
|
||||||
|
}
|
||||||
trans = NGX_RTMP_BANDWIDTH_DETECTION_BWCHECK_TRANS;
|
trans = NGX_RTMP_BANDWIDTH_DETECTION_BWCHECK_TRANS;
|
||||||
|
|
||||||
memset(&h, 0, sizeof(h));
|
memset(&h, 0, sizeof(h));
|
||||||
|
|
Loading…
Reference in a new issue