diff options
author | Thomas Hellstrom <unichrome@shipmail.org> | 2005-11-15 10:54:15 +0000 |
---|---|---|
committer | Thomas Hellstrom <unichrome@shipmail.org> | 2005-11-15 10:54:15 +0000 |
commit | cf81d405385ba56dd5bb0bcfb78f21c3f45f544d (patch) | |
tree | 851afbfd843417dcaea8ce8be33b980e708318ed | |
parent | cd843de0de38759259127459eb0c2199bbd3e6cb (diff) |
Fix via video surface reallocation and destruction. (Reported by Cedric
Berger)
-rw-r--r-- | src/via_swov.c | 5 | ||||
-rw-r--r-- | src/via_video.c | 2 | ||||
-rw-r--r-- | src/via_xvpriv.h | 1 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/via_swov.c b/src/via_swov.c index 530622c..9cd6814 100644 --- a/src/via_swov.c +++ b/src/via_swov.c @@ -1035,10 +1035,10 @@ ViaSwovSurfaceCreate(ScrnInfoPtr pScrn, viaPortPrivPtr pPriv, CARD32 FourCC, DBG_DD(ErrorF("ViaSwovSurfaceCreate: FourCC =0x%08lx\n", FourCC)); if ((pVia->VideoStatus & VIDEO_SWOV_SURFACE_CREATED) && - (FourCC == pPriv->lastId)) + (FourCC == pPriv->FourCC)) return Success; - pPriv->lastId = FourCC; + pPriv->FourCC = FourCC; switch (FourCC) { case FOURCC_YUY2: case FOURCC_RV15: @@ -1123,6 +1123,7 @@ ViaSwovSurfaceDestroy(ScrnInfoPtr pScrn, viaPortPrivPtr pPriv) break; } + pPriv->FourCC = 0; pVia->VideoStatus &= ~VIDEO_SWOV_SURFACE_CREATED; } else diff --git a/src/via_video.c b/src/via_video.c index bbed666..6da5ab9 100644 --- a/src/via_video.c +++ b/src/via_video.c @@ -676,7 +676,7 @@ viaSetupAdaptors(ScreenPtr pScreen, XF86VideoAdaptorPtr **adaptors) viaPortPriv[j].saturation = 10000; viaPortPriv[j].contrast = 10000; viaPortPriv[j].hue = 0; - viaPortPriv[j].lastId = 0; + viaPortPriv[j].FourCC = 0; viaPortPriv[j].xv_portnum = j + usedPorts; REGION_NULL(pScreen, &viaPortPriv[j].clip); } diff --git a/src/via_xvpriv.h b/src/via_xvpriv.h index 3914ae3..b692e91 100644 --- a/src/via_xvpriv.h +++ b/src/via_xvpriv.h @@ -41,7 +41,6 @@ typedef struct { int saturation; int contrast; int hue; - int lastId; RegionRec clip; CARD32 colorKey; Bool autoPaint; |