[vlc-commits] macosx: advanced prefs: save the default value if Default is selected, not NULL

David Fuhrmann git at videolan.org
Thu Jul 11 20:23:53 CEST 2013


vlc/vlc-2.1 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Thu Jul 11 20:13:24 2013 +0200| [9c0e2a2df0d9fae960ec3c5c722ea581701cc52c] | committer: David Fuhrmann

macosx: advanced prefs: save the default value if Default is selected, not NULL

fixes #8942. Default value for avcodec-hw is none, but NULL was saved, so
hardware decoding got enabled unintentionally.
(cherry picked from commit 3a96bb0f05cdcd427d53333b9461d00fa23060c2)

Signed-off-by: David Fuhrmann <david.fuhrmann at googlemail.com>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=9c0e2a2df0d9fae960ec3c5c722ea581701cc52c
---

 modules/gui/macosx/prefs_widgets.m |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/gui/macosx/prefs_widgets.m b/modules/gui/macosx/prefs_widgets.m
index 74fea7e..b956b9e 100644
--- a/modules/gui/macosx/prefs_widgets.m
+++ b/modules/gui/macosx/prefs_widgets.m
@@ -1280,6 +1280,10 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];     \
         }
     }
     module_list_free(p_list);
+
+    if(returnval == NULL && [newval isEqualToString: _NS("Default")] && p_item->orig.psz != NULL) {
+        returnval = strdup(p_item->orig.psz);
+    }
     return returnval;
 }
 



More information about the vlc-commits mailing list