From feda7257912b438c79f4761cec411c8d83a058b1 Mon Sep 17 00:00:00 2001 From: pl Date: Sat, 20 Sep 2003 00:52:51 +0000 Subject: 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) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10888 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/dmo/DMO_VideoDecoder.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'loader') diff --git a/loader/dmo/DMO_VideoDecoder.c b/loader/dmo/DMO_VideoDecoder.c index 8bad5379e9..76ffed5e57 100644 --- a/loader/dmo/DMO_VideoDecoder.c +++ b/loader/dmo/DMO_VideoDecoder.c @@ -463,8 +463,9 @@ int DMO_VideoDecoder_SetDestFmt(DMO_VideoDecoder *this, int bits, unsigned int c 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; -- cgit v1.2.3