[QUARTZ] Fix for bug 3489

Christian Costa titan.costa at wanadoo.fr
Sun Oct 9 12:56:39 CDT 2005


Hi,

Changelog:
Make window uses black brush for background.
Check format type of video stream.

Christian Costa   titan.costa at wanadoo.fr

-------------- next part --------------
Index: dlls/quartz/videorenderer.c
===================================================================
RCS file: /home/wine/wine/dlls/quartz/videorenderer.c,v
retrieving revision 1.16
diff -u -r1.16 videorenderer.c
--- dlls/quartz/videorenderer.c	25 Sep 2005 15:23:21 -0000	1.16
+++ dlls/quartz/videorenderer.c	9 Oct 2005 16:43:00 -0000
@@ -148,7 +148,7 @@
     winclass.hInstance = NULL;
     winclass.hIcon = NULL;
     winclass.hCursor = NULL;
-    winclass.hbrBackground = NULL;
+    winclass.hbrBackground = GetStockObject(BLACK_BRUSH);
     winclass.lpszMenuName = NULL;
     winclass.lpszClassName = "Wine ActiveMovie Class";
 
@@ -391,11 +391,19 @@
 
 static HRESULT VideoRenderer_QueryAccept(LPVOID iface, const AM_MEDIA_TYPE * pmt)
 {
-    if ((IsEqualIID(&pmt->majortype, &MEDIATYPE_Video) && IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB32)) ||
-        (IsEqualIID(&pmt->majortype, &MEDIATYPE_Video) && IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB24)) ||
-        (IsEqualIID(&pmt->majortype, &MEDIATYPE_Video) && IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB565)) ||
-        (IsEqualIID(&pmt->majortype, &MEDIATYPE_Video) && IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB8)))
+    if (!IsEqualIID(&pmt->majortype, &MEDIATYPE_Video))
+        return S_FALSE;
+
+    if (IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB32) ||
+        IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB24) ||
+        IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB565) ||
+        IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB8))
     {
+        if (!IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo))
+        {
+            WARN("Format type %s not supported\n", debugstr_guid(&pmt->formattype));
+            return S_FALSE;
+        }
         VideoRendererImpl* This = (VideoRendererImpl*) iface;
         VIDEOINFOHEADER* format = (VIDEOINFOHEADER*)pmt->pbFormat;
         This->SourceRect.left = 0;


More information about the wine-patches mailing list