summaryrefslogtreecommitdiff
path: root/src/radeon_video.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2008-08-25 10:05:28 -0400
committerAlex Deucher <alexdeucher@gmail.com>2008-08-25 10:05:28 -0400
commit5b1978a4796bcc31ac2f01d303dc8f8f44323025 (patch)
treee845695dc0bd30f1f939b21ab6e7bbd69f26a40e /src/radeon_video.c
parent7daba77ded1c718e93ae8c372a39a6e85228d513 (diff)
Bicubic fixes from the last cherry-pick
Diffstat (limited to 'src/radeon_video.c')
-rw-r--r--src/radeon_video.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/radeon_video.c b/src/radeon_video.c
index e86a7d4c..598bf2b6 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -1614,13 +1614,12 @@ RADEONSetupImageVideo(ScreenPtr pScreen)
pPriv->textured = FALSE;
- if(pPriv->theatre != NULL)
- {
+ if(pPriv->theatre != NULL) {
/* video decoder is present, extend capabilities */
adapt->nEncodings = 13;
adapt->pEncodings = InputVideoEncodings;
adapt->type |= XvVideoMask;
- adapt->nAttributes = NUM_DEC_ATTRIBUTES;
+ adapt->nAttributes = NUM_DEC_ATTRIBUTES;
adapt->PutVideo = RADEONPutVideo;
}
@@ -1636,8 +1635,19 @@ RADEONStopVideo(ScrnInfoPtr pScrn, pointer data, Bool cleanup)
unsigned char *RADEONMMIO = info->MMIO;
RADEONPortPrivPtr pPriv = (RADEONPortPrivPtr)data;
- if (pPriv->textured)
- return;
+ if (pPriv->textured) {
+ if (cleanup) {
+ if (pPriv->bicubic_memory != NULL) {
+ radeon_free_memory(pScrn, pPriv->bicubic_memory);
+ pPriv->bicubic_memory = NULL;
+ }
+ if (pPriv->video_memory != NULL) {
+ radeon_free_memory(pScrn, pPriv->video_memory);
+ pPriv->video_memory = NULL;
+ }
+ }
+ return;
+ }
REGION_EMPTY(pScrn->pScreen, &pPriv->clip);
@@ -1660,10 +1670,6 @@ RADEONStopVideo(ScrnInfoPtr pScrn, pointer data, Bool cleanup)
radeon_free_memory(pScrn, pPriv->video_memory);
pPriv->video_memory = NULL;
}
- if (pPriv->bicubic_memory != NULL) {
- RADEONFreeMemory(pScrn, pPriv->bicubic_memory);
- pPriv->bicubic_memory = NULL;
- }
pPriv->videoStatus = 0;
} else {
if(pPriv->videoStatus & CLIENT_VIDEO_ON) {
@@ -3129,10 +3135,6 @@ RADEONVideoTimerCallback(ScrnInfoPtr pScrn, Time now)
radeon_free_memory(pScrn, pPriv->video_memory);
pPriv->video_memory = NULL;
}
- if (pPriv->bicubic_memory != NULL) {
- RADEONFreeMemory(pScrn, pPriv->bicubic_memory);
- pPriv->bicubic_memory = NULL;
- }
pPriv->videoStatus = 0;
info->VideoTimerCallback = NULL;
}