From a931220af6969edc0c9fda81e44efcf2867691b4 Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Tue, 19 May 2020 19:55:36 +0400 Subject: [PATCH] [Core] Fix wrong switch_assert expressions in switch_core_session_write_frame() --- src/switch_core_media.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/switch_core_media.c b/src/switch_core_media.c index d69e1286f5..810306a91d 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -16018,7 +16018,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess session->write_codec->cur_frame = frame; frame->codec->cur_frame = frame; switch_assert(enc_frame->datalen <= SWITCH_RECOMMENDED_BUFFER_SIZE); - switch_assert(session->enc_read_frame.datalen <= SWITCH_RECOMMENDED_BUFFER_SIZE); + switch_assert(session->enc_write_frame.datalen <= SWITCH_RECOMMENDED_BUFFER_SIZE); status = switch_core_codec_encode(session->write_codec, frame->codec, enc_frame->data, @@ -16026,7 +16026,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess session->write_impl.actual_samples_per_second, session->enc_write_frame.data, &session->enc_write_frame.datalen, &session->enc_write_frame.rate, &flag); - switch_assert(session->enc_read_frame.datalen <= SWITCH_RECOMMENDED_BUFFER_SIZE); + switch_assert(session->enc_write_frame.datalen <= SWITCH_RECOMMENDED_BUFFER_SIZE); session->write_codec->cur_frame = NULL; frame->codec->cur_frame = NULL; @@ -16128,7 +16128,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess session->write_codec->cur_frame = frame; frame->codec->cur_frame = frame; switch_assert(enc_frame->datalen <= SWITCH_RECOMMENDED_BUFFER_SIZE); - switch_assert(session->enc_read_frame.datalen <= SWITCH_RECOMMENDED_BUFFER_SIZE); + switch_assert(session->enc_write_frame.datalen <= SWITCH_RECOMMENDED_BUFFER_SIZE); status = switch_core_codec_encode(session->write_codec, frame->codec, enc_frame->data, @@ -16136,7 +16136,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess rate, session->enc_write_frame.data, &session->enc_write_frame.datalen, &session->enc_write_frame.rate, &flag); - switch_assert(session->enc_read_frame.datalen <= SWITCH_RECOMMENDED_BUFFER_SIZE); + switch_assert(session->enc_write_frame.datalen <= SWITCH_RECOMMENDED_BUFFER_SIZE); session->write_codec->cur_frame = NULL; frame->codec->cur_frame = NULL;