From 957613420e9c4906e8bb8ac685e10fc0c24329b8 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Wed, 9 Apr 2014 09:00:36 +0200 Subject: plugins: Add plugin_release_audio_buffer(). Some plugins grab the whole audio buffer and still want to start playback somehow (e.g. random_folder_advance_config). Since 22e802e the plugin buffer is allocated via buflib and has to be released explicitely. For these plugins the automatic free on exit is not sufficient and they need an API function for that. Fixes OOM panic on random_folder_advance_config when using start shuffled playback. Change-Id: I0d351daa782cb829f4ff80d34c05f40a2e0c142f --- apps/plugins/random_folder_advance_config.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apps/plugins') diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c index 0b3532dde0..add1fc5724 100644 --- a/apps/plugins/random_folder_advance_config.c +++ b/apps/plugins/random_folder_advance_config.c @@ -541,6 +541,9 @@ static int start_shuffled_play(void) } } rb->splash(HZ, "Done"); + /* the core needs the audio buffer back in order to start playback. */ + list = NULL; + rb->plugin_release_audio_buffer(); rb->playlist_start(0, 0, 0); return 1; } -- cgit v1.2.3