Skip to content

Commit fd40db0

Browse files
TEL-6649: Add test_string_stream_mem_leak for mod_sofia
1 parent 8f448ec commit fd40db0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/mod/applications/mod_av/avformat.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2540,6 +2540,11 @@ static switch_status_t av_file_write(switch_file_handle_t *handle, void *data, s
25402540
int inuse;
25412541
int sample_start = 0;
25422542
AVCodecContext *c = NULL;
2543+
const char *uuid = NULL;
2544+
2545+
if (handle->params) {
2546+
uuid = switch_event_get_header(handle->params, "session");
2547+
}
25432548

25442549
if (!switch_test_flag(handle, SWITCH_FILE_FLAG_WRITE)) {
25452550
return SWITCH_STATUS_FALSE;
@@ -2738,10 +2743,7 @@ GCC_DIAG_ON(deprecated-declarations)
27382743
if ((context->errs % 10) == 0) {
27392744
char ebuf[255] = "";
27402745

2741-
char uuid_buf[SWITCH_UUID_FORMATTED_LENGTH + 1] = "";
2742-
2743-
switch_uuid_str(uuid_buf, sizeof(uuid_buf));
2744-
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid_buf), SWITCH_LOG_ERROR, "Error while writing audio frame: %d %s\n", ret, get_error_text(ret, ebuf, sizeof(ebuf)));
2746+
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_ERROR, "Error while writing audio frame: %d %s\n", ret, get_error_text(ret, ebuf, sizeof(ebuf)));
27452747
if ((ret == -5 || ret == -104) && handle->stream_name) {
27462748
context->errs = 1001;
27472749
}

0 commit comments

Comments
 (0)