[xiph-commits] r16910 - trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder
cristianadam at svn.xiph.org
cristianadam at svn.xiph.org
Wed Feb 17 15:59:42 PST 2010
Author: cristianadam
Date: 2010-02-17 15:59:42 -0800 (Wed, 17 Feb 2010)
New Revision: 16910
Modified:
trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp
Log:
Fixed bug #1603 - Theora Videos Encoded At Around 480x360 Crash Directshow Filter
Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp 2010-02-17 23:07:58 UTC (rev 16909)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp 2010-02-17 23:59:42 UTC (rev 16910)
@@ -279,8 +279,8 @@
inFormatBuffer->bmiHeader.biClrUsed = 0; //Use max colour depth
inFormatBuffer->bmiHeader.biCompression = m_outputVideoParams[inPosition].fourCC;
- inFormatBuffer->bmiHeader.biWidth = locFilter->m_theoraFormatInfo->pictureWidth;
- inFormatBuffer->bmiHeader.biHeight = locFilter->m_theoraFormatInfo->pictureHeight;
+ inFormatBuffer->bmiHeader.biWidth = ((locFilter->m_theoraFormatInfo->pictureWidth + 15) >> 4) << 4;
+ inFormatBuffer->bmiHeader.biHeight = ((locFilter->m_theoraFormatInfo->pictureHeight + 15) >> 4) << 4;
inFormatBuffer->bmiHeader.biPlanes = 1; //Must be 1
inFormatBuffer->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
inFormatBuffer->bmiHeader.biSizeImage = GetBitmapSize(&inFormatBuffer->bmiHeader);
@@ -315,11 +315,11 @@
inFormatBuffer->bmiHeader.biClrUsed = 0; //Use max colour depth
inFormatBuffer->bmiHeader.biCompression = m_outputVideoParams[inPosition].fourCC;
- inFormatBuffer->bmiHeader.biHeight = locFilter->m_theoraFormatInfo->pictureHeight;
+ inFormatBuffer->bmiHeader.biHeight = ((locFilter->m_theoraFormatInfo->pictureHeight + 15) >> 4) << 4;
+ inFormatBuffer->bmiHeader.biWidth = ((locFilter->m_theoraFormatInfo->pictureWidth + 15) >> 4) << 4;
inFormatBuffer->bmiHeader.biPlanes = 1; //Must be 1
inFormatBuffer->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
inFormatBuffer->bmiHeader.biSizeImage = GetBitmapSize(&inFormatBuffer->bmiHeader);
- inFormatBuffer->bmiHeader.biWidth = locFilter->m_theoraFormatInfo->pictureWidth;
inFormatBuffer->bmiHeader.biXPelsPerMeter = 0; //Fuck knows
inFormatBuffer->bmiHeader.biYPelsPerMeter = 0; //" " " " "
@@ -523,7 +523,7 @@
return locHR;
}
- LOG(logDEBUG) << "Buffer allocated";
+ LOG(logINFO) << __FUNCTIONW__ << " Buffer size: " << locActualAlloc.cbBuffer << ", buffers: " << locActualAlloc.cBuffers;
return S_OK;
}
More information about the commits
mailing list