mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-06-01 06:09:32 +02:00
fixed buffer allocation when broadcasting
This commit is contained in:
parent
68c64116b2
commit
eaef3b90b9
2
TODO
2
TODO
|
@ -11,6 +11,8 @@
|
||||||
- closing session on send error
|
- closing session on send error
|
||||||
causes crash because of double-freeing stack
|
causes crash because of double-freeing stack
|
||||||
|
|
||||||
|
- add max message size
|
||||||
|
|
||||||
- recognize amf-meta
|
- recognize amf-meta
|
||||||
|
|
||||||
- shortcuts for big-endian copy
|
- shortcuts for big-endian copy
|
||||||
|
|
|
@ -227,7 +227,7 @@ ngx_rtmp_broadcast_av(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
|
||||||
ngx_rtmp_broadcast_ctx_t *ctx, *cctx;
|
ngx_rtmp_broadcast_ctx_t *ctx, *cctx;
|
||||||
ngx_chain_t *out, *l, **ll;
|
ngx_chain_t *out, *l, **ll;
|
||||||
u_char *p;
|
u_char *p;
|
||||||
size_t nsubs;
|
size_t nsubs, size;
|
||||||
|
|
||||||
c = s->connection;
|
c = s->connection;
|
||||||
|
|
||||||
|
@ -267,9 +267,9 @@ ngx_rtmp_broadcast_av(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
|
||||||
p = in->buf->pos;
|
p = in->buf->pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
l->buf->last = ngx_cpymem(l->buf->last, p,
|
size = l->buf->end - l->buf->last;
|
||||||
l->buf->end - l->buf->last);
|
l->buf->last = ngx_cpymem(l->buf->last, p, size);
|
||||||
p += (l->buf->end - l->buf->last);
|
p += size;
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
Loading…
Reference in a new issue