diff loader/dshow/DS_VideoDecoder.c @ 3466:b6caac381405

avifile merge
author arpi
date Tue, 11 Dec 2001 23:29:11 +0000
parents ebab4801241f
children c00db356082f
line wrap: on
line diff
--- a/loader/dshow/DS_VideoDecoder.c	Tue Dec 11 22:58:14 2001 +0000
+++ b/loader/dshow/DS_VideoDecoder.c	Tue Dec 11 23:29:11 2001 +0000
@@ -152,14 +152,14 @@
 
 	if (!flip)
 	{
-	    this->m_sVhdr2->bmiHeader.biHeight *= -1;
 	    this->iv.m_obh.biHeight *= -1;
+	    this->m_sVhdr2->bmiHeader.biHeight = this->iv.m_obh.biHeight;
 	    result = this->m_pDS_Filter->m_pOutputPin->vt->QueryAccept(this->m_pDS_Filter->m_pOutputPin, &this->m_sDestType);
 	    if (result)
 	    {
-		printf("Decoder does not support upside-down frames\n");
-		this->m_sVhdr2->bmiHeader.biHeight *= -1;
+		printf("Decoder does not support upside-down RGB frames\n");
 		this->iv.m_obh.biHeight *= -1;
+		this->m_sVhdr2->bmiHeader.biHeight = this->iv.m_obh.biHeight;
 	    }
 	}
 
@@ -280,9 +280,9 @@
     }
 
 
+    sample->vt->SetActualDataLength(sample, size);
     sample->vt->GetPointer(sample, (BYTE **)&ptr);
     memcpy(ptr, src, size);
-    sample->vt->SetActualDataLength(sample, size);
     sample->vt->SetSyncPoint(sample, is_keyframe);
     sample->vt->SetPreroll(sample, pImage ? 0 : 1);
     // sample->vt->SetMediaType(sample, &m_sOurType);