aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Gui/bitmap.c2
-rw-r--r--Gui/bitmap/bitmap.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Gui/bitmap.c b/Gui/bitmap.c
index fcb4c3d2e8..e1d5a61734 100644
--- a/Gui/bitmap.c
+++ b/Gui/bitmap.c
@@ -114,7 +114,7 @@ void Convert32to1( txSample * in,txSample * out,int adaptivlimit )
out->Width=in->Width;
out->Height=in->Height;
out->BPP=1;
- out->ImageSize=out->Width * out->Height / 8;
+ out->ImageSize=(out->Width * out->Height + 7) / 8;
mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c1to32] imagesize: %d\n",out->ImageSize );
out->Image=(char *)calloc( 1,out->ImageSize );
if ( out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_STATUS,"nem van ram baze\n" );
diff --git a/Gui/bitmap/bitmap.c b/Gui/bitmap/bitmap.c
index fcb4c3d2e8..e1d5a61734 100644
--- a/Gui/bitmap/bitmap.c
+++ b/Gui/bitmap/bitmap.c
@@ -114,7 +114,7 @@ void Convert32to1( txSample * in,txSample * out,int adaptivlimit )
out->Width=in->Width;
out->Height=in->Height;
out->BPP=1;
- out->ImageSize=out->Width * out->Height / 8;
+ out->ImageSize=(out->Width * out->Height + 7) / 8;
mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[c1to32] imagesize: %d\n",out->ImageSize );
out->Image=(char *)calloc( 1,out->ImageSize );
if ( out->Image == NULL ) mp_msg( MSGT_GPLAYER,MSGL_STATUS,"nem van ram baze\n" );