From 9b79c65ec06f2bbe4f44c615b9df70db23126250 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sun, 17 Dec 2017 18:03:47 +0100 Subject: [PATCH] lavu/lavc/lavf/lavfi: Do not use type modifier %zu on Windows MSVCRT. --- libavcodec/cbs_h2645.c | 2 +- libavcodec/cbs_mpeg2.c | 2 +- libavfilter/vf_showinfo.c | 4 +++- libavfilter/vf_unsharp_opencl.c | 3 ++- libavformat/dump.c | 4 +++- libavutil/hwcontext_opencl.c | 2 +- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c index 742857bd19..2f96e4f20e 100644 --- a/libavcodec/cbs_h2645.c +++ b/libavcodec/cbs_h2645.c @@ -1237,7 +1237,7 @@ static int cbs_h2645_write_nal_unit(CodedBitstreamContext *ctx, if (err < 0) { av_log(ctx->log_ctx, AV_LOG_ERROR, "Unable to allocate a " "sufficiently large write buffer (last attempt " - "%zu bytes).\n", priv->write_buffer_size); + "%"SIZE_SPECIFIER" bytes).\n", priv->write_buffer_size); return err; } } diff --git a/libavcodec/cbs_mpeg2.c b/libavcodec/cbs_mpeg2.c index 8fb5375e3b..642a9c99b1 100644 --- a/libavcodec/cbs_mpeg2.c +++ b/libavcodec/cbs_mpeg2.c @@ -305,7 +305,7 @@ static int cbs_mpeg2_write_unit(CodedBitstreamContext *ctx, if (err < 0) { av_log(ctx->log_ctx, AV_LOG_ERROR, "Unable to allocate a " "sufficiently large write buffer (last attempt " - "%zu bytes).\n", priv->write_buffer_size); + "%"SIZE_SPECIFIER" bytes).\n", priv->write_buffer_size); return err; } } diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index e0b3223801..d1d1415c0b 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/vf_showinfo.c @@ -68,7 +68,9 @@ static void dump_spherical(AVFilterContext *ctx, AVFrame *frame, AVFrameSideData size_t l, t, r, b; av_spherical_tile_bounds(spherical, frame->width, frame->height, &l, &t, &r, &b); - av_log(ctx, AV_LOG_INFO, "[%zu, %zu, %zu, %zu] ", l, t, r, b); + av_log(ctx, AV_LOG_INFO, + "[%"SIZE_SPECIFIER", %"SIZE_SPECIFIER", %"SIZE_SPECIFIER", %"SIZE_SPECIFIER"] ", + l, t, r, b); } else if (spherical->projection == AV_SPHERICAL_CUBEMAP) { av_log(ctx, AV_LOG_INFO, "[pad %"PRIu32"] ", spherical->padding); } diff --git a/libavfilter/vf_unsharp_opencl.c b/libavfilter/vf_unsharp_opencl.c index c2ebf70ad9..6a453c014b 100644 --- a/libavfilter/vf_unsharp_opencl.c +++ b/libavfilter/vf_unsharp_opencl.c @@ -331,7 +331,8 @@ static int unsharp_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input) } av_log(avctx, AV_LOG_DEBUG, "Run kernel on plane %d " - "(%zux%zu).\n", p, global_work[0], global_work[1]); + "(%"SIZE_SPECIFIER"x%"SIZE_SPECIFIER").\n", + p, global_work[0], global_work[1]); cle = clEnqueueNDRangeKernel(ctx->command_queue, ctx->kernel, 2, NULL, global_work, ctx->global ? NULL : local_work, diff --git a/libavformat/dump.c b/libavformat/dump.c index 77043e3fdb..ef143fd4e2 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -372,7 +372,9 @@ static void dump_spherical(void *ctx, AVCodecParameters *par, AVPacketSideData * size_t l, t, r, b; av_spherical_tile_bounds(spherical, par->width, par->height, &l, &t, &r, &b); - av_log(ctx, AV_LOG_INFO, "[%zu, %zu, %zu, %zu] ", l, t, r, b); + av_log(ctx, AV_LOG_INFO, + "[%"SIZE_SPECIFIER", %"SIZE_SPECIFIER", %"SIZE_SPECIFIER", %"SIZE_SPECIFIER"] ", + l, t, r, b); } else if (spherical->projection == AV_SPHERICAL_CUBEMAP) { av_log(ctx, AV_LOG_INFO, "[pad %"PRIu32"] ", spherical->padding); } diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c index b00c1b6409..a725a491e2 100644 --- a/libavutil/hwcontext_opencl.c +++ b/libavutil/hwcontext_opencl.c @@ -2719,7 +2719,7 @@ static int opencl_map_from_drm_arm(AVHWFramesContext *dst_fc, AVFrame *dst, &fd, desc->objects[i].size, &cle); if (!mapping->object_buffers[i]) { av_log(dst_fc, AV_LOG_ERROR, "Failed to create CL buffer " - "from object %d (fd %d, size %zu) of DRM frame: %d.\n", + "from object %d (fd %d, size %"SIZE_SPECIFIER") of DRM frame: %d.\n", i, fd, desc->objects[i].size, cle); err = AVERROR(EIO); goto fail;