summaryrefslogtreecommitdiff
path: root/apps/plugins/random_folder_advance_config.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-04-09 09:00:36 +0200
committerThomas Martitz <kugel@rockbox.org>2014-04-09 09:04:10 +0200
commit957613420e9c4906e8bb8ac685e10fc0c24329b8 (patch)
tree810061339f17dbe30759fc0acc7d04070ce2ed40 /apps/plugins/random_folder_advance_config.c
parent924a3c48d2b1a807bd7cd3b4b1e042fd2e3d7d06 (diff)
downloadrockbox-957613420e9c4906e8bb8ac685e10fc0c24329b8.tar.gz
rockbox-957613420e9c4906e8bb8ac685e10fc0c24329b8.zip
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
Diffstat (limited to 'apps/plugins/random_folder_advance_config.c')
-rw-r--r--apps/plugins/random_folder_advance_config.c3
1 files changed, 3 insertions, 0 deletions
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)
541 } 541 }
542 } 542 }
543 rb->splash(HZ, "Done"); 543 rb->splash(HZ, "Done");
544 /* the core needs the audio buffer back in order to start playback. */
545 list = NULL;
546 rb->plugin_release_audio_buffer();
544 rb->playlist_start(0, 0, 0); 547 rb->playlist_start(0, 0, 0);
545 return 1; 548 return 1;
546} 549}