sink-input: fix to add ducking silence block with correct sample spec 58/216758/2 accepted/tizen/unified/20191107.140658 submit/tizen/20191107.041351
authorSeungbae Shin <seungbae.shin@samsung.com>
Fri, 1 Nov 2019 01:44:40 +0000 (10:44 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Fri, 1 Nov 2019 01:48:49 +0000 (10:48 +0900)
[Version] 11.1-80
[Issue Type] Bug fix

Change-Id: I2dc445abdd121178d4890089b0a63520dba6f271

packaging/pulseaudio.spec
src/pulsecore/sink-input.c

index 70e5a2d..708a5b0 100644 (file)
@@ -3,7 +3,7 @@
 Name:             pulseaudio
 Summary:          Improved Linux sound server
 Version:          11.1
-Release:          79
+Release:          80
 Group:            Multimedia/Audio
 License:          LGPL-2.1
 URL:              http://pulseaudio.org
index b1a625a..f0bcf4f 100644 (file)
@@ -1031,13 +1031,12 @@ static void check_and_apply_silence(pa_sink_input *i) {
 
     if (i->thread_info.silenced && i->thread_info.silence_duration > 0) {
         pa_memchunk schunk;
-        size_t target_length;
+        size_t target_length = pa_usec_to_bytes(i->thread_info.silence_duration, &i->sink->sample_spec);
 
-        target_length = pa_usec_to_bytes(i->thread_info.silence_duration, &i->sample_spec);
         pa_silence_memchunk_get(&i->core->silence_cache,
                                 i->core->mempool,
                                 &schunk,
-                                &i->sample_spec,
+                                &i->sink->sample_spec,
                                 i->thread_info.resampler ? pa_resampler_max_block_size(i->thread_info.resampler) : 0);
 
         while (target_length > 0) {