[vlc-devel] [PATCH] audio_output: ensure volume_set callback is set before calling
Thomas Guillem
thomas at gllm.fr
Thu Mar 26 16:40:31 CET 2020
Hello,
thanks for this patch,
On Thu, Mar 26, 2020, at 16:27, Tristan Matthews wrote:
> This fixes a crash when changing the volume while using the file aout module.
> ---
> src/audio_output/output.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/audio_output/output.c b/src/audio_output/output.c
> index 472acc968f..76ef5f16ea 100644
> --- a/src/audio_output/output.c
> +++ b/src/audio_output/output.c
> @@ -653,7 +653,7 @@ int aout_VolumeSet (audio_output_t *aout, float vol)
> int ret;
>
> vlc_mutex_lock(&owner->lock);
> - ret = aout->volume_set(aout, vol);
> + ret = aout->volume_set ? aout->volume_set(aout, vol) : -1;
You could do the same for mute_set and device_select.
it's a regression from 8fb81d08d6500136d467a46c4796c0872d7705cd
> vlc_mutex_unlock(&owner->lock);
> return ret ? -1 : 0;
> }
> --
> 2.20.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list