--- branches/dev-api-4/xvidcore/dshow/src/CXvidDecoder.cpp 2004/02/06 11:27:43 1352 +++ branches/dev-api-4/xvidcore/dshow/src/CXvidDecoder.cpp 2004/02/07 03:57:39 1353 @@ -19,7 +19,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.1.2.17 2004-02-03 06:57:24 syskin Exp $ + * $Id: CXvidDecoder.cpp,v 1.1.2.18 2004-02-07 03:57:39 syskin Exp $ * ****************************************************************************/ @@ -63,8 +63,6 @@ #include "config.h" #include "debug.h" - -static int rgb_flip; static bool USE_IYUV; static bool USE_YV12; static bool USE_YUY2; @@ -331,8 +329,8 @@ hdr = &vih->bmiHeader; /* PAR (x:y) is (1/ppm_X):(1/ppm_Y) where ppm is pixels-per-meter which is equal to ppm_Y:ppm_X */ - ar_x = vih->bmiHeader.biYPelsPerMeter*hdr->biWidth; - ar_y = vih->bmiHeader.biXPelsPerMeter*hdr->biHeight; + ar_x = vih->bmiHeader.biYPelsPerMeter * abs(hdr->biWidth); + ar_y = vih->bmiHeader.biXPelsPerMeter * abs(hdr->biHeight); } else if (*mtIn->FormatType() == FORMAT_VideoInfo2) { @@ -498,7 +496,7 @@ vih->dwPictAspectRatioY = ar_y; } else { // just to be safe vih->dwPictAspectRatioX = m_create.width; - vih->dwPictAspectRatioY = m_create.height; + vih->dwPictAspectRatioY = abs(m_create.height); } mtOut->SetType(&MEDIATYPE_Video); @@ -783,7 +781,7 @@ if (pIn->IsPreroll() == S_OK) { return S_FALSE; } - + return S_OK; }