summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorpl <pl@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-09-20 00:52:51 +0000
committerpl <pl@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-09-20 00:52:51 +0000
commitfeda7257912b438c79f4761cec411c8d83a058b1 (patch)
tree7c5953698d143d6b679f591ea53d57d5ef51be5a /loader
parent73cc418a759e5c8fa45949cdf22ee1d3be52b831 (diff)
downloadmpv-feda7257912b438c79f4761cec411c8d83a058b1.tar.bz2
mpv-feda7257912b438c79f4761cec411c8d83a058b1.tar.xz
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
Diffstat (limited to 'loader')
-rw-r--r--loader/dmo/DMO_VideoDecoder.c5
1 files changed, 3 insertions, 2 deletions
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;