summaryrefslogtreecommitdiff
path: root/apps/playlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playlist.c')
-rw-r--r--apps/playlist.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 25bd60dd2a..481524b9d4 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -2020,7 +2020,7 @@ static void alloc_namebuffer(void)
2020static int alloc_tempbuf(size_t* buflen) 2020static int alloc_tempbuf(size_t* buflen)
2021{ 2021{
2022 /* request a reasonable size first */ 2022 /* request a reasonable size first */
2023 int handle = core_alloc_ex(NULL, PLAYLIST_LOAD_BUFLEN, &buflib_ops_locked); 2023 int handle = core_alloc_ex(PLAYLIST_LOAD_BUFLEN, &buflib_ops_locked);
2024 if (handle > 0) 2024 if (handle > 0)
2025 { 2025 {
2026 *buflen = PLAYLIST_LOAD_BUFLEN; 2026 *buflen = PLAYLIST_LOAD_BUFLEN;
@@ -2028,7 +2028,7 @@ static int alloc_tempbuf(size_t* buflen)
2028 } 2028 }
2029 2029
2030 /* otherwise, try being unreasonable */ 2030 /* otherwise, try being unreasonable */
2031 return core_alloc_maximum(NULL, buflen, &buflib_ops_locked); 2031 return core_alloc_maximum(buflen, &buflib_ops_locked);
2032} 2032}
2033 2033
2034/* 2034/*
@@ -2075,15 +2075,14 @@ void playlist_init(void)
2075 playlist->fd = -1; 2075 playlist->fd = -1;
2076 playlist->control_fd = -1; 2076 playlist->control_fd = -1;
2077 playlist->max_playlist_size = global_settings.max_files_in_playlist; 2077 playlist->max_playlist_size = global_settings.max_files_in_playlist;
2078 handle = core_alloc_ex("playlist idx",
2079 playlist->max_playlist_size * sizeof(*playlist->indices), &ops);
2080 2078
2079 handle = core_alloc_ex(playlist->max_playlist_size * sizeof(*playlist->indices), &ops);
2081 playlist->indices = core_get_data(handle); 2080 playlist->indices = core_get_data(handle);
2082 2081
2083 initalize_new_playlist(playlist, true); 2082 initalize_new_playlist(playlist, true);
2084 2083
2085#ifdef HAVE_DIRCACHE 2084#ifdef HAVE_DIRCACHE
2086 handle = core_alloc_ex("playlist dc", 2085 handle = core_alloc_ex(
2087 playlist->max_playlist_size * sizeof(*playlist->dcfrefs), &ops); 2086 playlist->max_playlist_size * sizeof(*playlist->dcfrefs), &ops);
2088 playlist->dcfrefs = core_get_data(handle); 2087 playlist->dcfrefs = core_get_data(handle);
2089 dc_copy_filerefs(playlist->dcfrefs, NULL, playlist->max_playlist_size); 2088 dc_copy_filerefs(playlist->dcfrefs, NULL, playlist->max_playlist_size);