mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-05-17 00:51:09 +02:00
Merge pull request #89 from sergey-dryabzhinsky/74-fix-metadata
Revert previous fix.
This commit is contained in:
commit
2d4613c906
|
@ -845,6 +845,11 @@ ngx_rtmp_codec_meta_data(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
|
||||||
|
|
||||||
static ngx_rtmp_amf_elt_t in_elts[] = {
|
static ngx_rtmp_amf_elt_t in_elts[] = {
|
||||||
|
|
||||||
|
/* That string is passed by FFmpeg and possibly others (librtmp). It's skipped after at #880 */
|
||||||
|
{ NGX_RTMP_AMF_STRING,
|
||||||
|
ngx_null_string,
|
||||||
|
NULL, 0 },
|
||||||
|
|
||||||
{ NGX_RTMP_AMF_OBJECT,
|
{ NGX_RTMP_AMF_OBJECT,
|
||||||
ngx_null_string,
|
ngx_null_string,
|
||||||
in_inf, sizeof(in_inf) },
|
in_inf, sizeof(in_inf) },
|
||||||
|
@ -872,7 +877,7 @@ ngx_rtmp_codec_meta_data(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
|
||||||
v.profile[0] = '\0';
|
v.profile[0] = '\0';
|
||||||
v.level[0] = '\0';
|
v.level[0] = '\0';
|
||||||
|
|
||||||
/* FFmpeg sends a string in front of actal metadata; ignore it */
|
/* FFmpeg sends a string in front of actual metadata; ignore it */
|
||||||
skip = !(in->buf->last > in->buf->pos
|
skip = !(in->buf->last > in->buf->pos
|
||||||
&& *in->buf->pos == NGX_RTMP_AMF_STRING);
|
&& *in->buf->pos == NGX_RTMP_AMF_STRING);
|
||||||
if (ngx_rtmp_receive_amf(s, in, in_elts + skip,
|
if (ngx_rtmp_receive_amf(s, in, in_elts + skip,
|
||||||
|
|
Loading…
Reference in a new issue