From 5c2f94c8bfa7b98b3c832d0ce11c6ecdbd474029 Mon Sep 17 00:00:00 2001 From: waker Date: Thu, 31 Mar 2011 22:06:22 +0200 Subject: thread-safe config access --- plugins/ffmpeg/ffmpeg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/ffmpeg') diff --git a/plugins/ffmpeg/ffmpeg.c b/plugins/ffmpeg/ffmpeg.c index 6872db8a..d28b54b4 100644 --- a/plugins/ffmpeg/ffmpeg.c +++ b/plugins/ffmpeg/ffmpeg.c @@ -674,7 +674,8 @@ static URLProtocol vfswrapper = { static void ffmpeg_init_exts (void) { - const char *new_exts = deadbeef->conf_get_str ("ffmpeg.extensions", DEFAULT_EXTS); + deadbeef->conf_lock (); + const char *new_exts = deadbeef->conf_get_str_fast ("ffmpeg.extensions", DEFAULT_EXTS); for (int i = 0; exts[i]; i++) { free (exts[i]); } @@ -702,6 +703,7 @@ ffmpeg_init_exts (void) { new_exts = e+1; } exts[n] = NULL; + deadbeef->conf_unlock (); } static int -- cgit v1.2.3