[PATCH] Xv: Fix AdjustFrame when driver implements ReputImage.

Luc Verhaegen libv at skynet.be
Wed Nov 11 06:52:39 PST 2009


Finally fixes fd.o #4653, filed more than 4 years ago.

Patch can be happily applied to all modular Xorg versions.

Signed-off-by: Luc Verhaegen <libv at skynet.be>
---
 hw/xfree86/common/xf86xv.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index abbe033..8221659 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -1297,7 +1297,7 @@ xf86XVAdjustFrame(int index, int x, int y, int flags)
       for(i = pa->nPorts; i > 0; i--, pPort++) {
 	pPriv = (XvPortRecPrivatePtr)pPort->devPriv.ptr;
 
-	if(!pPriv->type && (pPriv->isOn == XV_ON)) { /* overlaid still/image */
+	if(!pPriv->type && (pPriv->isOn != XV_OFF)) { /* overlaid still/image */
 
 	  if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
 	     REGION_DESTROY(pScreen, pPriv->pCompositeClip);
@@ -1311,7 +1311,7 @@ xf86XVAdjustFrame(int index, int x, int y, int flags)
 	      (pWin->visibility == VisibilityPartiallyObscured)))
 	  {
 	      xf86XVReputImage(pPriv);
-	  } else {
+	  } else if (pPriv->isOn == XV_ON) {
 	     (*pPriv->AdaptorRec->StopVideo)(
 				 pPriv->pScrn, pPriv->DevPriv.ptr, FALSE);
 	     xf86XVRemovePortFromWindow(pWin, pPriv);
-- 
1.6.0.2


--BXVAT5kNtrzKuDFl--


More information about the xorg-devel mailing list