mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
cs_malloc_uncached() infrequently generates neutrino segfaults, so let's use malloc as a workaround
- add a check if fbbuff is NULL
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1689 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: 7658db6423
Author: gixxpunk <thomas.harfmann@gmail.com>
Date: 2011-09-14 (Wed, 14 Sep 2011)
Origin message was:
------------------
- cs_malloc_uncached() infrequently generates neutrino segfaults, so let's use malloc as a workaround
- add a check if fbbuff is NULL
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1689 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -570,15 +570,20 @@ fb_pixel_t * CPictureViewer::getIcon (const std::string & name, int *width, int
|
||||
}
|
||||
rgbbuff = (unsigned char *) malloc (x * y * 3);
|
||||
if (rgbbuff == NULL) {
|
||||
printf ("getIcon: Error: malloc\n");
|
||||
printf ("getIcon: Error: rgbbuff malloc\n");
|
||||
return NULL;
|
||||
}
|
||||
if (fh->get_pic (name.c_str (), &rgbbuff, &x, &y) == FH_ERROR_OK) {
|
||||
int count = x*y;
|
||||
|
||||
//fbbuff = (fb_pixel_t *) malloc(count * sizeof(fb_pixel_t));
|
||||
fbbuff = (fb_pixel_t *) cs_malloc_uncached(count * sizeof(fb_pixel_t));
|
||||
//cs_malloc_uncached infrequently generates neutrino segfaults, so let's use malloc (striper)
|
||||
fbbuff = (fb_pixel_t *) malloc(count * sizeof(fb_pixel_t));
|
||||
//fbbuff = (fb_pixel_t *) cs_malloc_uncached(count * sizeof(fb_pixel_t));
|
||||
//printf("getIcon: decoded %s, %d x %d buf %x\n", name.c_str (), x, y, fbbuff);
|
||||
if (fbbuff == NULL) {
|
||||
printf ("getIcon: Error: fbbuff malloc\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for(int i = 0; i < count ; i++) {
|
||||
int transp = 0;
|
||||
|
Reference in New Issue
Block a user