From: Jaechul Lee Date: Wed, 27 Sep 2023 08:27:00 +0000 (+0900) Subject: preprocess: Fix pulseaudio crash when reference resampler is NULL X-Git-Tag: accepted/tizen/unified/20231011.153126^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9fbdefc69c91e0004fa63a28fe77dbaa1eed025d;p=platform%2Fcore%2Fmultimedia%2Fpulseaudio-modules-tizen.git preprocess: Fix pulseaudio crash when reference resampler is NULL reference resampler could be NULL if a source-ouput spec and a reference spec are same. [Version] 15.0.57 [Issue Type] Update Change-Id: I8ce29df53ca24040424d8999418a771233381cad Signed-off-by: Jaechul Lee --- diff --git a/packaging/pulseaudio-modules-tizen.spec b/packaging/pulseaudio-modules-tizen.spec index 41cc8f4..10192c9 100644 --- a/packaging/pulseaudio-modules-tizen.spec +++ b/packaging/pulseaudio-modules-tizen.spec @@ -2,7 +2,7 @@ Name: pulseaudio-modules-tizen Summary: Pulseaudio modules for Tizen -Version: 15.0.56 +Version: 15.0.57 Release: 0 Group: Multimedia/Audio License: LGPL-2.1+ diff --git a/src/preprocessor/processor_reference.c b/src/preprocessor/processor_reference.c index df1041a..01655ed 100644 --- a/src/preprocessor/processor_reference.c +++ b/src/preprocessor/processor_reference.c @@ -166,7 +166,9 @@ void pa_processor_reference_reset(pa_processor_reference *reference) { pa_memblockq_silence(reference->memblockq); pa_memblockq_flush_write(reference->memblockq, false); - pa_resampler_reset(reference->resampler); + + if (reference->resampler) + pa_resampler_reset(reference->resampler); } int pa_processor_reference_push(pa_processor_reference *reference, pa_memchunk *chunk) {