implemented double headers aac/avc: live(prepared) & flv(unprepared)

This commit is contained in:
Roman Arutyunyan
2012-06-09 21:29:19 +04:00
parent 9a118b612e
commit ebc47f03a4
4 changed files with 37 additions and 13 deletions

View File

@ -374,14 +374,14 @@ ngx_rtmp_live_av(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
if (codec_ctx) {
peer_out = NULL;
if (h->type == NGX_RTMP_MSG_AUDIO) {
if (codec_ctx->aac_header) {
peer_out = codec_ctx->aac_header;
if (codec_ctx->aac_pheader) {
peer_out = codec_ctx->aac_pheader;
ngx_log_debug0(NGX_LOG_DEBUG_RTMP, ss->connection->log,
0, "live: sending AAC header");
}
} else {
if (codec_ctx->avc_header) {
peer_out = codec_ctx->avc_header;
if (codec_ctx->avc_pheader) {
peer_out = codec_ctx->avc_pheader;
ngx_log_debug0(NGX_LOG_DEBUG_RTMP, ss->connection->log,
0, "live: sending AVC/H264 header");
}