[FFmpeg-cvslog] avutil/hwcontext_d3d11va: fix mixed declaration and code

Timo Rothenpieler git at videolan.org
Mon Jul 18 03:09:24 EEST 2022


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Wed Jul  6 01:46:25 2022 +0200| [e18c5754745b56a4467fd85ee07b21c3306c2678] | committer: Timo Rothenpieler

avutil/hwcontext_d3d11va: fix mixed declaration and code

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e18c5754745b56a4467fd85ee07b21c3306c2678
---

 libavutil/hwcontext_d3d11va.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c
index 904d14bbc8..e5afcb2a9d 100644
--- a/libavutil/hwcontext_d3d11va.c
+++ b/libavutil/hwcontext_d3d11va.c
@@ -397,6 +397,7 @@ static int d3d11va_transfer_data(AVHWFramesContext *ctx, AVFrame *dst,
     D3D11_TEXTURE2D_DESC desc;
     D3D11_MAPPED_SUBRESOURCE map;
     HRESULT hr;
+    int res;
 
     if (frame->hw_frames_ctx->data != (uint8_t *)ctx || other->format != ctx->sw_format)
         return AVERROR(EINVAL);
@@ -405,7 +406,7 @@ static int d3d11va_transfer_data(AVHWFramesContext *ctx, AVFrame *dst,
 
     if (!s->staging_texture) {
         ID3D11Texture2D_GetDesc((ID3D11Texture2D *)texture, &desc);
-        int res = d3d11va_create_staging_texture(ctx, desc.Format);
+        res = d3d11va_create_staging_texture(ctx, desc.Format);
         if (res < 0)
             return res;
     }



More information about the ffmpeg-cvslog mailing list