mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
fb_accel_td: don't crash for no reason
Origin commit data
------------------
Branch: ni/coolstream
Commit: 15824b81c5
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2018-01-14 (Sun, 14 Jan 2018)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
committed by
vanhofen
parent
48e7d3044b
commit
3e7497e903
@@ -109,6 +109,7 @@ void CFbAccelTD::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t
|
|||||||
DFBResult err;
|
DFBResult err;
|
||||||
IDirectFBSurface *surf;
|
IDirectFBSurface *surf;
|
||||||
DFBSurfaceDescription dsc;
|
DFBSurfaceDescription dsc;
|
||||||
|
int pitch = width * sizeof(fb_pixel_t);
|
||||||
|
|
||||||
src.x = xp;
|
src.x = xp;
|
||||||
src.y = yp;
|
src.y = yp;
|
||||||
@@ -120,12 +121,13 @@ void CFbAccelTD::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t
|
|||||||
dsc.width = width;
|
dsc.width = width;
|
||||||
dsc.height = height;
|
dsc.height = height;
|
||||||
dsc.preallocated[0].data = fbbuff;
|
dsc.preallocated[0].data = fbbuff;
|
||||||
dsc.preallocated[0].pitch = width * sizeof(fb_pixel_t);
|
dsc.preallocated[0].pitch = pitch;
|
||||||
err = dfb->CreateSurface(dfb, &dsc, &surf);
|
err = dfb->CreateSurface(dfb, &dsc, &surf);
|
||||||
/* TODO: maybe we should not die if this fails? */
|
|
||||||
if (err != DFB_OK) {
|
if (err != DFB_OK) {
|
||||||
fprintf(stderr, LOGTAG "blit2FB: ");
|
/* probably width or height out of range... */
|
||||||
DirectFBErrorFatal("dfb->CreateSurface(dfb, &dsc, &surf)", err);
|
fprintf(stderr, LOGTAG "blit2FB: w:%d h:%d data:0x%p pitch:%d\n", width, height, fbbuff, pitch);
|
||||||
|
DirectFBError("dfb->CreateSurface(dfb, &dsc, &surf)", err);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (transp)
|
if (transp)
|
||||||
|
Reference in New Issue
Block a user