changeset 10887:858e2605726c

fix for the no video/black screen with some dmo/wmv9 movies (for some videos: bits=12 and once /8 the allocated buffer is 50% too small)
author pl
date Sat, 20 Sep 2003 00:52:51 +0000
parents ed0fcc08c988
children 0e940f364a6e
files loader/dmo/DMO_VideoDecoder.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/loader/dmo/DMO_VideoDecoder.c	Sat Sep 20 00:51:51 2003 +0000
+++ b/loader/dmo/DMO_VideoDecoder.c	Sat Sep 20 00:52:51 2003 +0000
@@ -463,8 +463,9 @@
 	  this->iv.m_obh.biSize = sizeof(BITMAPINFOHEADER);
 	  this->iv.m_obh.biCompression=csp;
 	  this->iv.m_obh.biBitCount=bits;
-	  this->iv.m_obh.biSizeImage=labs(this->iv.m_obh.biBitCount*
-             this->iv.m_obh.biWidth*this->iv.m_obh.biHeight)>>3;
+
+	  this->iv.m_obh.biSizeImage = labs(this->iv.m_obh.biWidth * this->iv.m_obh.biHeight)
+                                       * ((this->iv.m_obh.biBitCount + 7) / 8);
         }
     }
     this->m_sDestType.lSampleSize = this->iv.m_obh.biSizeImage;