playlist.c remove panic from OOM conditions

the splash suffices as warning let the calling code decide what to do with it

everything I saw calling expected failure with a -1 return so it shouldn't
cause any issue removing the panic

Change-Id: Idc1fba91c3ab4f1fd78e1d6a07dc2e6a0bfd8970
This commit is contained in:
William Wilgus 2021-12-08 21:44:12 -05:00
parent 221e8752cc
commit 8c88d5c5e2

View file

@ -102,7 +102,6 @@
#include "rbunicode.h"
#include "root_menu.h"
#include "plugin.h" /* To borrow a temp buffer to rewrite a .m3u8 file */
#include "panic.h"
#include "logdiskf.h"
#ifdef HAVE_DIRCACHE
#include "dircache.h"
@ -2092,8 +2091,9 @@ int playlist_create(const char *dir, const char *file)
}
else
{
/* should not happen */
panicf("%s(): OOM", __func__);
/* should not happen -- happens if plugin takes audio buffer */
splashf(HZ * 2, "%s(): OOM", __func__);
return -1;
}
}
@ -2127,7 +2127,10 @@ int playlist_resume(void)
talk_buffer_set_policy(TALK_BUFFER_LOOSE); /* back off voice buffer */
handle = core_alloc_maximum("temp", &buflen, &dummy_ops);
if (handle < 0)
panicf("%s(): OOM", __func__);
{
splashf(HZ * 2, "%s(): OOM", __func__);
return -1;
}
buffer = core_get_data(handle);
empty_playlist(playlist, true);