--- trunk/xvidcore/dshow/src/CXvidDecoder.cpp 2011/03/10 15:27:57 1961 +++ trunk/xvidcore/dshow/src/CXvidDecoder.cpp 2011/03/17 15:13:25 1962 @@ -20,7 +20,7 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: CXvidDecoder.cpp,v 1.28 2011-02-14 16:59:16 Isibaar Exp $ + * $Id: CXvidDecoder.cpp,v 1.29 2011-03-17 15:11:32 Isibaar Exp $ * ****************************************************************************/ @@ -816,7 +816,7 @@ /* (internal function) change colorspace */ #define CALC_BI_STRIDE(width,bitcount) ((((width * bitcount) + 31) & ~31) >> 3) -HRESULT CXvidDecoder::ChangeColorspace(GUID subtype, GUID formattype, void * format) +HRESULT CXvidDecoder::ChangeColorspace(GUID subtype, GUID formattype, void * format, int noflip) { DWORD biWidth; @@ -839,6 +839,8 @@ return S_FALSE; } + if (noflip) rgb_flip = 0; + if (subtype == CLSID_MEDIASUBTYPE_IYUV) { DPRINTF("IYUV"); @@ -912,7 +914,7 @@ if (direction == PINDIR_OUTPUT) { - return ChangeColorspace(*pmt->Subtype(), *pmt->FormatType(), pmt->Format()); + return ChangeColorspace(*pmt->Subtype(), *pmt->FormatType(), pmt->Format(), 0); } return S_OK; @@ -1049,7 +1051,7 @@ { HRESULT result; - result = ChangeColorspace(mtOut->subtype, mtOut->formattype, mtOut->pbFormat); + result = ChangeColorspace(mtOut->subtype, mtOut->formattype, mtOut->pbFormat, 0); DeleteMediaType(mtOut); if (result != S_OK) @@ -1630,7 +1632,7 @@ hr = MFCreateAMMediaTypeFromMFMediaType(pType, GUID_NULL, &am); if (SUCCEEDED(hr)) { - if (FAILED(ChangeColorspace(am->subtype, am->formattype, am->pbFormat))) { + if (FAILED(ChangeColorspace(am->subtype, am->formattype, am->pbFormat, 1))) { DPRINTF("(MFT)InternalCheckOutputType (MF_E_INVALIDTYPE)"); return MF_E_INVALIDTYPE; }