[vlc-devel] [PATCH] lib: fix typos in libvlc_media_player_set_equalizer

Adrien Maglo magsoft at videolan.org
Wed Jun 18 12:21:05 CEST 2014


Le 18/06/2014 11:59, Rémi Denis-Courmont a écrit :
> Le 2014-06-17 17:55, Adrien Maglo a écrit :
>> Le 17/06/2014 11:26, Rémi Denis-Courmont a écrit :
>>> Le 2014-06-17 17:14, Adrien Maglo a écrit :
>>>> Le 16/06/2014 20:06, Rémi Denis-Courmont a écrit :
>>>>> Le 2014-06-16 22:47, Adrien Maglo a écrit :
>>>>>> @@ -1517,7 +1517,7 @@ int libvlc_media_player_set_equalizer(
>>>>>> libvlc_media_player_t *p_mi, libvlc_equal
>>>>>>              var_SetString( p_aout, "equalizer-bands", bands );
>>>>>>          }
>>>>>>
>>>>>> -        var_SetString( p_mi, "audio-filter", p_equalizer ?
>>>>>> "equalizer" : "" );
>>>>>> +        var_SetString( p_aout, "audio-filter", p_equalizer ?
>>>>>> "equalizer" : "" );
>>>>>
>>>>> Are you sure that works across changes of audio output plugin? I
>>>>> strongly doubt it.
>>>>
>>>> This seems to work. I think that playlist_EnableAudioFilter() uses
>>>> the same method.
>>>
>>> I don't think the playlist can ever change its (primary) audio output
>>> plugin, so the comparison should be meaningless.
>>
>> What about
>> var_Create (aout, "audio-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT)
>> in aout_New() (audio_output/output.c)?
>> The value is not inherited from the libvlc_media_player_t instance?
>
> But that's the point. For the audio output to inherit the value from the
> media player instance, the value must be set on the media player
> instance. Otherwise, the value gets lost when changing the audio output
> plugin.

Sure but if I understand well, that is already done in the code just 
above this section (lib/media_player.c line 1509):
var_SetString( p_mi, "audio-filter", p_equalizer ? "equalizer" : "" );

That is why I think this part of the patch is just correcting a copy 
paste error.

Best regards,


-- 
MagSoft




More information about the vlc-devel mailing list