xserver: Branch 'master'

Michel Daenzer daenzer at kemper.freedesktop.org
Thu May 24 05:42:31 PDT 2007


 hw/xfree86/common/xf86xv.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

New commits:
diff-tree 649e7f82d8d4333443493056b81eb20d6cf022bc (from 047bf3349bb697c73c95729a8bbf15f72605901f)
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Thu May 24 12:10:05 2007 +0200

    Consolidate portPriv->pDraw assignments into xf86XVEnlistPortInWindow.
    
    This avoids a crash in xf86XVReputVideo and also cleans up the code slightly.

diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index 2b097d2..02fcde6 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -979,6 +979,9 @@ xf86XVEnlistPortInWindow(WindowPtr pWin,
 	winPriv->next = PrivRoot;
 	pWin->devPrivates[XF86XVWindowIndex].ptr = (pointer)winPriv;
    }
+
+   portPriv->pDraw = (DrawablePtr)pWin;
+
    return Success;
 }
 
@@ -1375,7 +1378,6 @@ xf86XVPutVideo(
   result =  xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
   if(result != Success) return result;
 
-  portPriv->pDraw = pDraw;
   portPriv->type = XvInputMask;
 
   /* save a copy of these parameters */
@@ -1479,7 +1481,6 @@ xf86XVPutStill(
 
      xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
      portPriv->isOn = XV_ON;
-     portPriv->pDraw = pDraw;
      portPriv->drw_x = drw_x;  portPriv->drw_y = drw_y;
      portPriv->drw_w = drw_w;  portPriv->drw_h = drw_h;
      portPriv->type = 0;  /* no mask means it's transient and should
@@ -1529,7 +1530,6 @@ xf86XVGetVideo(
   result =  xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv);
   if(result != Success) return result;
 
-  portPriv->pDraw = pDraw;
   portPriv->type = XvOutputMask;
 
   /* save a copy of these parameters */
@@ -1784,7 +1784,6 @@ xf86XVPutImage(
 	(portPriv->AdaptorRec->flags & VIDEO_OVERLAID_IMAGES)) {
 
      portPriv->isOn = XV_ON;
-     portPriv->pDraw = pDraw;
      portPriv->drw_x = drw_x;  portPriv->drw_y = drw_y;
      portPriv->drw_w = drw_w;  portPriv->drw_h = drw_h;
      portPriv->type = 0;  /* no mask means it's transient and should


More information about the xorg-commit mailing list