[vlc-commits] dxva2: log why the surface creation fails
Steve Lhomme
git at videolan.org
Mon Aug 1 09:57:11 CEST 2016
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Fri Jul 29 17:09:54 2016 +0200| [1255f933249eb734be8a232796fe51d5e2debd8d] | committer: Jean-Baptiste Kempf
dxva2: log why the surface creation fails
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1255f933249eb734be8a232796fe51d5e2debd8d
---
modules/codec/avcodec/dxva2.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 936e1df..583a236 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -698,8 +698,9 @@ static int DxCreateVideoDecoder(vlc_va_t *va, int codec_id, const video_format_t
vlc_va_sys_t *p_sys = va->sys;
directx_sys_t *sys = &va->sys->dx_sys;
+ HRESULT hr;
- if (FAILED(IDirectXVideoDecoderService_CreateSurface((IDirectXVideoDecoderService*) sys->d3ddec,
+ hr = IDirectXVideoDecoderService_CreateSurface((IDirectXVideoDecoderService*) sys->d3ddec,
sys->surface_width,
sys->surface_height,
sys->surface_count - 1,
@@ -708,8 +709,9 @@ static int DxCreateVideoDecoder(vlc_va_t *va, int codec_id, const video_format_t
0,
DXVA2_VideoDecoderRenderTarget,
(LPDIRECT3DSURFACE9*) sys->hw_surface,
- NULL))) {
- msg_Err(va, "IDirectXVideoAccelerationService_CreateSurface failed");
+ NULL);
+ if (FAILED(hr)) {
+ msg_Err(va, "IDirectXVideoAccelerationService_CreateSurface failed (hr=0x%0lx)", hr);
sys->surface_count = 0;
return VLC_EGENERIC;
}
More information about the vlc-commits
mailing list