[vlc-commits] Qt4: fix racy access to configuration
Rémi Denis-Courmont
git at videolan.org
Sat Nov 15 11:33:50 CET 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 15 12:33:33 2014 +0200| [f39ed931e0ea7b3a275fe69e2336eb597c9a1d14] | committer: Rémi Denis-Courmont
Qt4: fix racy access to configuration
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f39ed931e0ea7b3a275fe69e2336eb597c9a1d14
---
modules/gui/qt4/components/simple_preferences.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp
index f73657d..0f04767 100644
--- a/modules/gui/qt4/components/simple_preferences.cpp
+++ b/modules/gui/qt4/components/simple_preferences.cpp
@@ -1098,9 +1098,7 @@ void SPrefsPanel::apply()
qobject_cast<QSlider *>(optionWidgets["defaultVolume"])->value();
bool b_reset_volume =
qobject_cast<QCheckBox *>(optionWidgets["resetVolumeCheckbox"])->isChecked();
- module_config_t *p_config = config_FindConfig( VLC_OBJECT(p_intf), "aout" );
- char *psz_aout = p_config->value.psz;
-
+ char *psz_aout = config_GetPsz( p_intf, "aout" );
float f_gain = powf( i_volume / 100.f, 3 );
@@ -1129,6 +1127,7 @@ void SPrefsPanel::apply()
config_PutFloat( p_intf, "jack-gain", f_gain );
#endif
#undef save_vol_aout
+ free( psz_aout );
config_PutInt( p_intf, "volume-save", !b_reset_volume );
More information about the vlc-commits
mailing list