]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/sink-input.c
Use pa_hashmap_remove_and_free() where appropriate
[pulseaudio] / src / pulsecore / sink-input.c
index 9ae95e2ec1e2cd7ba3f99fee17d7e99f68d00e49..b9264419b7d943e7b80bf22a8e6de954f20a3fea 100644 (file)
@@ -1096,7 +1096,7 @@ void pa_sink_input_process_rewind(pa_sink_input *i, size_t nbytes /* in sink sam
                 i->process_rewind(i, amount);
             called = true;
 
-            /* Convert back to to sink domain */
+            /* Convert back to sink domain */
             if (i->thread_info.resampler)
                 amount = pa_resampler_result(i->thread_info.resampler, amount);
 
@@ -1324,13 +1324,9 @@ int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key) {
     pa_assert_ctl_context();
     pa_assert(PA_SINK_INPUT_IS_LINKED(i->state));
 
-    v = pa_hashmap_remove(i->volume_factor_items, key);
-
-    if (!v)
+    if (pa_hashmap_remove_and_free(i->volume_factor_items, key) < 0)
         return -1;
 
-    volume_factor_entry_free(v);
-
     switch (pa_hashmap_size(i->volume_factor_items)) {
         case 0:
             pa_cvolume_reset(&i->volume_factor, i->sample_spec.channels);
@@ -2210,7 +2206,8 @@ int pa_sink_input_update_rate(pa_sink_input *i) {
                                      i->requested_resample_method,
                                      ((i->flags & PA_SINK_INPUT_VARIABLE_RATE) ? PA_RESAMPLER_VARIABLE_RATE : 0) |
                                      ((i->flags & PA_SINK_INPUT_NO_REMAP) ? PA_RESAMPLER_NO_REMAP : 0) |
-                                     (i->core->disable_remixing || (i->flags & PA_SINK_INPUT_NO_REMIX) ? PA_RESAMPLER_NO_REMIX : 0));
+                                     (i->core->disable_remixing || (i->flags & PA_SINK_INPUT_NO_REMIX) ? PA_RESAMPLER_NO_REMIX : 0) |
+                                     (i->core->disable_lfe_remixing ? PA_RESAMPLER_NO_LFE : 0));
 
         if (!new_resampler) {
             pa_log_warn("Unsupported resampling operation.");