Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIV-1259: audio stream transcoding fails due to low memory on packager & ingest server #206

Merged
merged 4 commits into from
May 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 19 additions & 18 deletions nginx-rtmp-module/src/ngx_rtmp_codec_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,30 +580,31 @@ ngx_rtmp_codec_av(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h, ngx_chain_t *in)
}

/* no conf */
if (h->type == NGX_RTMP_MSG_VIDEO
&& !ngx_rtmp_is_codec_header(ctx->video_codec_id, in))
if (!ngx_rtmp_is_codec_header(ctx->video_codec_id, in))
igorshevach marked this conversation as resolved.
Show resolved Hide resolved
{
if (ctx->video_captions_tries <= 0) {
return NGX_OK;
}
if(h->type == NGX_RTMP_MSG_VIDEO) {
igorshevach marked this conversation as resolved.
Show resolved Hide resolved
if (ctx->video_captions_tries <= 0) {
return NGX_OK;
}

switch (ctx->video_codec_id) {
switch (ctx->video_codec_id) {

case NGX_RTMP_VIDEO_H264:
case NGX_RTMP_CODEC_FOURCC_HVC1:
case NGX_RTMP_CODEC_FOURCC_HEV1:
if (ngx_rtmp_codec_detect_cea(s, in)) {
ctx->video_captions = 1;
ctx->video_captions_tries = 0;
case NGX_RTMP_VIDEO_H264:
case NGX_RTMP_CODEC_FOURCC_HVC1:
case NGX_RTMP_CODEC_FOURCC_HEV1:
if (ngx_rtmp_codec_detect_cea(s, in)) {
ctx->video_captions = 1;
ctx->video_captions_tries = 0;

} else {
ctx->video_captions_tries--;
}
} else {
ctx->video_captions_tries--;
}

break;
break;

default:
ctx->video_captions_tries = 0;
default:
ctx->video_captions_tries = 0;
}
}

return NGX_OK;
Expand Down
Loading