mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Destroy vdpau surface only, when initialized.
This commit is contained in:
parent
8e53cbd4a9
commit
788636ee6b
14
video.c
14
video.c
@ -3955,7 +3955,7 @@ static void VdpauInitOutputQueue(void)
|
|||||||
|
|
||||||
format = VDP_RGBA_FORMAT_B8G8R8A8;
|
format = VDP_RGBA_FORMAT_B8G8R8A8;
|
||||||
// FIXME: does a 10bit rgba produce a better output?
|
// FIXME: does a 10bit rgba produce a better output?
|
||||||
format = VDP_RGBA_FORMAT_R10G10B10A2;
|
// format = VDP_RGBA_FORMAT_R10G10B10A2;
|
||||||
status =
|
status =
|
||||||
VdpauOutputSurfaceCreate(VdpauDevice, format, VideoWindowWidth,
|
VdpauOutputSurfaceCreate(VdpauDevice, format, VideoWindowWidth,
|
||||||
VideoWindowHeight, VdpauSurfacesRb + i);
|
VideoWindowHeight, VdpauSurfacesRb + i);
|
||||||
@ -3991,12 +3991,14 @@ static void VdpauExitOutputQueue(void)
|
|||||||
|
|
||||||
Debug(4, "video/vdpau: destroy output surface with id 0x%08x\n",
|
Debug(4, "video/vdpau: destroy output surface with id 0x%08x\n",
|
||||||
VdpauSurfacesRb[i]);
|
VdpauSurfacesRb[i]);
|
||||||
status = VdpauOutputSurfaceDestroy(VdpauSurfacesRb[i]);
|
if ( VdpauSurfacesRb[i] != VDP_INVALID_HANDLE ) {
|
||||||
if (status != VDP_STATUS_OK) {
|
status = VdpauOutputSurfaceDestroy(VdpauSurfacesRb[i]);
|
||||||
Error(_("video/vdpau: can't destroy output surface: %s\n"),
|
if (status != VDP_STATUS_OK) {
|
||||||
VdpauGetErrorString(status));
|
Error(_("video/vdpau: can't destroy output surface: %s\n"),
|
||||||
|
VdpauGetErrorString(status));
|
||||||
|
}
|
||||||
|
VdpauSurfacesRb[i] = VDP_INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
VdpauSurfacesRb[i] = VDP_INVALID_HANDLE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user