[vlc-commits] va_surface: fix printing of size_t in logs

Steve Lhomme git at videolan.org
Tue Oct 22 09:02:10 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Oct 22 08:12:14 2019 +0200| [c8cd126f6c3efff8ccd6dbe24d708628c50680ec] | committer: Steve Lhomme

va_surface: fix printing of size_t in logs

After c0162d6dd7e289ce9006c146dfb3e35de4d8ddff

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

 modules/codec/avcodec/d3d11va.c    | 4 ++--
 modules/codec/avcodec/dxva2.c      | 4 ++--
 modules/codec/avcodec/va_surface.c | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index cd754d52f2..7784bc8cf6 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -658,7 +658,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
     ID3D11Texture2D *p_texture;
     hr = ID3D11Device_CreateTexture2D( sys->d3d_dev.d3ddevice, &texDesc, NULL, &p_texture );
     if (FAILED(hr)) {
-        msg_Err(va, "CreateTexture2D %d failed. (hr=0x%lX)", surface_count, hr);
+        msg_Err(va, "CreateTexture2D %zu failed. (hr=0x%lX)", surface_count, hr);
         return VLC_EGENERIC;
     }
 
@@ -683,7 +683,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
                                 &sys->renderSrc[surface_idx * D3D11_MAX_SHADER_VIEW]);
         }
     }
-    msg_Dbg(va, "ID3D11VideoDecoderOutputView succeed with %d surfaces (%dx%d)",
+    msg_Dbg(va, "ID3D11VideoDecoderOutputView succeed with %zu surfaces (%dx%d)",
             surface_count, fmt->i_width, fmt->i_height);
 
     D3D11_VIDEO_DECODER_DESC decoderDesc;
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 0e242b1905..eef1dfba2b 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -538,10 +538,10 @@ static int DxCreateVideoDecoder(vlc_va_t *va, int codec_id,
                                                          sys->hw_surface,
                                                          NULL);
     if (FAILED(hr)) {
-        msg_Err(va, "IDirectXVideoAccelerationService_CreateSurface %d failed (hr=0x%lX)", surface_count - 1, hr);
+        msg_Err(va, "IDirectXVideoAccelerationService_CreateSurface %zu failed (hr=0x%lX)", surface_count - 1, hr);
         return VLC_EGENERIC;
     }
-    msg_Dbg(va, "IDirectXVideoAccelerationService_CreateSurface succeed with %d surfaces (%dx%d)",
+    msg_Dbg(va, "IDirectXVideoAccelerationService_CreateSurface succeed with %zu surfaces (%dx%d)",
             surface_count, fmt->i_width, fmt->i_height);
 
     IDirect3DSurface9 *tstCrash;
diff --git a/modules/codec/avcodec/va_surface.c b/modules/codec/avcodec/va_surface.c
index d70e55eb3c..2798702f78 100644
--- a/modules/codec/avcodec/va_surface.c
+++ b/modules/codec/avcodec/va_surface.c
@@ -88,7 +88,7 @@ int va_pool_SetupDecoder(vlc_va_t *va, va_pool_t *va_pool, AVCodecContext *avctx
     }
 
     /* */
-    msg_Dbg(va, "va_pool_SetupDecoder id %d %dx%d count: %d", avctx->codec_id, avctx->coded_width, avctx->coded_height, count);
+    msg_Dbg(va, "va_pool_SetupDecoder id %d %dx%d count: %zu", avctx->codec_id, avctx->coded_width, avctx->coded_height, count);
 
     if (count > MAX_SURFACE_COUNT)
         return VLC_EGENERIC;



More information about the vlc-commits mailing list