Commit 3dbc91be authored by David Fuhrmann's avatar David Fuhrmann

macosx: fix moar string memleaks in audio effects code

parent 083c2a24
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#import "SharedDialogs.h" #import "SharedDialogs.h"
#import <vlc_common.h> #import <vlc_common.h>
#import <vlc_strings.h>
#import <math.h> #import <math.h>
...@@ -238,9 +237,9 @@ static VLCAudioEffects *_o_sharedInstance = nil; ...@@ -238,9 +237,9 @@ static VLCAudioEffects *_o_sharedInstance = nil;
if (p_object == NULL) if (p_object == NULL)
p_object = vlc_object_hold(pl_Get(p_intf)); p_object = vlc_object_hold(pl_Get(p_intf));
NSString *o_str = [NSString stringWithFormat:@"%s;%s;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%lli", NSString *o_str = [NSString stringWithFormat:@"%@;%@;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%lli",
vlc_b64_encode(var_GetNonEmptyString(p_object, "equalizer-preset")), B64EncAndFree(var_GetNonEmptyString(p_object, "equalizer-preset")),
vlc_b64_encode(config_GetPsz(p_intf, "audio-filter")), B64EncAndFree(config_GetPsz(p_intf, "audio-filter")),
config_GetFloat(p_intf, "compressor-rms-peak"), config_GetFloat(p_intf, "compressor-rms-peak"),
config_GetFloat(p_intf, "compressor-attack"), config_GetFloat(p_intf, "compressor-attack"),
config_GetFloat(p_intf, "compressor-release"), config_GetFloat(p_intf, "compressor-release"),
...@@ -308,11 +307,11 @@ static VLCAudioEffects *_o_sharedInstance = nil; ...@@ -308,11 +307,11 @@ static VLCAudioEffects *_o_sharedInstance = nil;
vlc_object_t *p_object = VLC_OBJECT(getAout()); vlc_object_t *p_object = VLC_OBJECT(getAout());
if (p_object == NULL) if (p_object == NULL)
p_object = vlc_object_hold(pl_Get(p_intf)); p_object = vlc_object_hold(pl_Get(p_intf));
var_SetString(p_object,"equalizer-preset",vlc_b64_decode([[items objectAtIndex:0] UTF8String])); var_SetString(p_object, "equalizer-preset", [B64DecNSStr([items objectAtIndex:0]) UTF8String]);
vlc_object_release(p_object); vlc_object_release(p_object);
/* filter handling */ /* filter handling */
NSString *tempString = [NSString stringWithFormat:@"%s", vlc_b64_decode([[items objectAtIndex:1] UTF8String])]; NSString *tempString = B64DecNSStr([items objectAtIndex:1]);
NSArray *tempArray; NSArray *tempArray;
NSUInteger count; NSUInteger count;
/* enable the new filters, if we have an aout */ /* enable the new filters, if we have an aout */
...@@ -473,7 +472,9 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf, ...@@ -473,7 +472,9 @@ static bool GetEqualizerStatus(intf_thread_t *p_custom_intf,
NSString *currentPreset = nil; NSString *currentPreset = nil;
if (p_aout) { if (p_aout) {
currentPreset = [NSString stringWithFormat:@"%s",var_GetNonEmptyString(p_aout, "equalizer-preset")]; char *psz_preset_string = var_GetNonEmptyString(p_aout, "equalizer-preset");
currentPreset = [NSString stringWithFormat:@"%s", psz_preset_string];
free(psz_preset_string);
vlc_object_release(p_aout); vlc_object_release(p_aout);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment