diff mbox series

[FFmpeg-devel] Enhancement for defect #6827

Message ID CA+0oUon-n7o1sGzZ-PxV5ErEFVCKXFBJjpXuPoPOK48oNiUq6Q@mail.gmail.com
State New
Headers show
Series [FFmpeg-devel] Enhancement for defect #6827
Related show

Checks

Context Check Description
andriy/configure warning Failed to apply patch
andriy/configure warning Failed to apply patch

Commit Message

Asaf Kave May 4, 2021, 12:58 p.m. UTC
Adding error logs to identify special failure, when Directd3d 9 is not
supported. see defect #6827 <https://trac.ffmpeg.org/ticket/6827>
---
 libavutil/hwcontext_dxva2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

     }

@@ -494,6 +494,7 @@ static int dxva2_device_create9ex(AVHWDeviceContext
*ctx, UINT adapter)
                                      FF_D3DCREATE_FLAGS,
                                      &d3dpp, NULL, &exdev);
     if (FAILED(hr)) {
+        av_log(ctx, AV_LOG_ERROR, "Failed to create Direct3D_EX device
(%lx)\n", (long)hr);
         IDirect3D9Ex_Release(d3d9ex);
         return AVERROR_UNKNOWN;
     }
--
2.19.1.windows.1
diff mbox series

Patch

diff --git a/libavutil/hwcontext_dxva2.c b/libavutil/hwcontext_dxva2.c
index 33b3dc80ff..41ca11760e 100644
--- a/libavutil/hwcontext_dxva2.c
+++ b/libavutil/hwcontext_dxva2.c
@@ -458,7 +458,7 @@  static int dxva2_device_create9(AVHWDeviceContext *ctx,
UINT adapter)
                                  FF_D3DCREATE_FLAGS,
                                  &d3dpp, &priv->d3d9device);
     if (FAILED(hr)) {
-        av_log(ctx, AV_LOG_ERROR, "Failed to create Direct3D device\n");
+        av_log(ctx, AV_LOG_ERROR, "Failed to create Direct3D device
(%lx)\n", (long)hr);
         return AVERROR_UNKNOWN;