summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-01-13 00:58:30 +0100
committerJohns <johns98@gmx.net>2012-01-13 00:58:30 +0100
commit788636ee6bf15447b20d7b85f7bb07e77971f0a3 (patch)
tree859c28a28d47b657e4dcf335a194a78e94d0b48a
parent8e53cbd4a9d7f30a4e32738d3d2c040d898f4193 (diff)
downloadvdr-plugin-softhddevice-788636ee6bf15447b20d7b85f7bb07e77971f0a3.tar.gz
vdr-plugin-softhddevice-788636ee6bf15447b20d7b85f7bb07e77971f0a3.tar.bz2
Destroy vdpau surface only, when initialized.
-rw-r--r--video.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/video.c b/video.c
index 62f8184..7c9d3a0 100644
--- a/video.c
+++ b/video.c
@@ -3955,7 +3955,7 @@ static void VdpauInitOutputQueue(void)
format = VDP_RGBA_FORMAT_B8G8R8A8;
// FIXME: does a 10bit rgba produce a better output?
- format = VDP_RGBA_FORMAT_R10G10B10A2;
+ // format = VDP_RGBA_FORMAT_R10G10B10A2;
status =
VdpauOutputSurfaceCreate(VdpauDevice, format, VideoWindowWidth,
VideoWindowHeight, VdpauSurfacesRb + i);
@@ -3991,12 +3991,14 @@ static void VdpauExitOutputQueue(void)
Debug(4, "video/vdpau: destroy output surface with id 0x%08x\n",
VdpauSurfacesRb[i]);
- status = VdpauOutputSurfaceDestroy(VdpauSurfacesRb[i]);
- if (status != VDP_STATUS_OK) {
- Error(_("video/vdpau: can't destroy output surface: %s\n"),
- VdpauGetErrorString(status));
+ if ( VdpauSurfacesRb[i] != VDP_INVALID_HANDLE ) {
+ status = VdpauOutputSurfaceDestroy(VdpauSurfacesRb[i]);
+ if (status != VDP_STATUS_OK) {
+ Error(_("video/vdpau: can't destroy output surface: %s\n"),
+ VdpauGetErrorString(status));
+ }
+ VdpauSurfacesRb[i] = VDP_INVALID_HANDLE;
}
- VdpauSurfacesRb[i] = VDP_INVALID_HANDLE;
}
}