Update ngx_rtmp_codec_module.c

Some encoders send "setDataFrame" instead of "@setDataFrame", which makes rtmp module can't show correct video frame rate in stat page.
This commit is contained in:
BeenWoo 2015-02-03 15:37:46 +08:00
parent 7a35372e30
commit cb36f9c23c

View file

@ -943,7 +943,15 @@ ngx_rtmp_codec_postconfiguration(ngx_conf_t *cf)
}
ngx_str_set(&ch->name, "@setDataFrame");
ch->handler = ngx_rtmp_codec_meta_data;
// some encoders send setDataFrame instead of @setDataFrame
ch = ngx_array_push(&cmcf->amf);
if (ch == NULL) {
return NGX_ERROR;
}
ngx_str_set(&ch->name, "setDataFrame");
ch->handler = ngx_rtmp_codec_meta_data;
ch = ngx_array_push(&cmcf->amf);
if (ch == NULL) {
return NGX_ERROR;