fixed metadata output

This commit is contained in:
Roman Arutyunyan
2012-07-02 18:04:50 +04:00
parent bf487dba0b
commit 792f5aedc7
2 changed files with 28 additions and 4 deletions

View File

@ -272,6 +272,10 @@ ngx_rtmp_codec_update_meta(ngx_rtmp_session_t *s)
static ngx_rtmp_amf_elt_t out_inf[] = {
{ NGX_RTMP_AMF_STRING,
ngx_string("Server"),
"NGINX RTMP (www.github.com/arut/nginx-rtmp-module)", 0 },
{ NGX_RTMP_AMF_NUMBER,
ngx_string("width"),
&v.width, 0 },
@ -280,6 +284,14 @@ ngx_rtmp_codec_update_meta(ngx_rtmp_session_t *s)
ngx_string("height"),
&v.height, 0 },
{ NGX_RTMP_AMF_NUMBER,
ngx_string("displayWidth"),
&v.width, 0 },
{ NGX_RTMP_AMF_NUMBER,
ngx_string("displayHeight"),
&v.height, 0 },
{ NGX_RTMP_AMF_NUMBER,
ngx_string("duration"),
&v.duration, 0 },
@ -323,10 +335,6 @@ ngx_rtmp_codec_update_meta(ngx_rtmp_session_t *s)
ngx_null_string,
"onMetaData", 0 },
{ NGX_RTMP_AMF_STRING,
ngx_null_string,
NULL, 0 },
{ NGX_RTMP_AMF_OBJECT,
ngx_null_string,
out_inf, sizeof(out_inf) },