From 62c1cca555ea277ecb5ae8d384b118996d060aec Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 24 Apr 2023 12:00:51 -0400 Subject: [PATCH] MT#56471 defuse mix_buffer without transcoding No need to compile something that isn't used. closes #1648 Change-Id: I33ccfe90d687a5c58f14039d0404a3cfcfa93aac --- lib/mix_buffer.c | 4 ++++ t/Makefile | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/mix_buffer.c b/lib/mix_buffer.c index cbb3d13e8..57a07ad24 100644 --- a/lib/mix_buffer.c +++ b/lib/mix_buffer.c @@ -1,3 +1,5 @@ +#ifdef WITH_TRANSCODING + #include "mix_buffer.h" #include #include @@ -320,3 +322,5 @@ void mix_buffer_destroy(struct mix_buffer *mb) { free_ssrc_hash(&mb->ssrc_hash); mutex_destroy(&mb->lock); } + +#endif diff --git a/t/Makefile b/t/Makefile index b797898e7..8fe89a583 100644 --- a/t/Makefile +++ b/t/Makefile @@ -62,7 +62,7 @@ LDLIBS+= -lhiredis LDLIBS+= $(shell mysql_config --libs) endif -SRCS= test-bitstr.c aes-crypt.c aead-aes-crypt.c test-const_str_hash.strhash.c test-mix-buffer.c +SRCS= test-bitstr.c aes-crypt.c aead-aes-crypt.c test-const_str_hash.strhash.c LIBSRCS= loglib.c auxlib.c str.c rtplib.c ssllib.c mix_buffer.c DAEMONSRCS= crypto.c ssrc.c aux.c rtp.c HASHSRCS= @@ -70,7 +70,7 @@ HASHSRCS= ifeq ($(with_transcoding),yes) SRCS+= test-transcode.c test-dtmf-detect.c test-payload-tracker.c test-resample.c test-stats.c SRCS+= spandsp_recv_fax_pcm.c spandsp_recv_fax_t38.c spandsp_send_fax_pcm.c \ - spandsp_send_fax_t38.c + spandsp_send_fax_t38.c test-mix-buffer.c ifeq ($(with_amr_tests),yes) SRCS+= test-amr-decode.c test-amr-encode.c endif @@ -95,9 +95,9 @@ include ../lib/common.Makefile daemon-tests-intfs daemon-tests-stats daemon-tests-delay-buffer daemon-tests-delay-timing \ daemon-tests-evs daemon-tests-player-cache daemon-tests-redis -TESTS= test-bitstr aes-crypt aead-aes-crypt test-const_str_hash.strhash test-mix-buffer +TESTS= test-bitstr aes-crypt aead-aes-crypt test-const_str_hash.strhash ifeq ($(with_transcoding),yes) -TESTS+= test-transcode test-dtmf-detect test-payload-tracker test-resample test-stats +TESTS+= test-transcode test-dtmf-detect test-payload-tracker test-resample test-stats test-mix-buffer ifeq ($(with_amr_tests),yes) TESTS+= test-amr-decode test-amr-encode endif