[FFmpeg-devel] [PATCH] avfilter/graphmonitor: use %z when printing size_t
Hendrik Leppkes
h.leppkes at gmail.com
Mon Nov 19 17:00:46 EET 2018
On Mon, Nov 19, 2018 at 3:38 PM James Almer <jamrial at gmail.com> wrote:
>
> On 11/19/2018 9:34 AM, Hendrik Leppkes wrote:
> > On Mon, Nov 19, 2018 at 12:27 PM Peter Ross <pross at xvid.org> wrote:
> >>
> >> ---
> >> 32-bit target compiler warning.
> >>
> >> libavfilter/f_graphmonitor.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/libavfilter/f_graphmonitor.c b/libavfilter/f_graphmonitor.c
> >> index 7052c84d9b..3cb8f73dd3 100644
> >> --- a/libavfilter/f_graphmonitor.c
> >> +++ b/libavfilter/f_graphmonitor.c
> >> @@ -211,7 +211,7 @@ static void draw_items(AVFilterContext *ctx, AVFrame *out,
> >> snprintf(buffer, sizeof(buffer)-1, " | queue: ");
> >> drawtext(out, xpos, ypos, buffer, s->white);
> >> xpos += strlen(buffer) * 8;
> >> - snprintf(buffer, sizeof(buffer)-1, "%"PRId64, frames);
> >> + snprintf(buffer, sizeof(buffer)-1, "%zd", frames);
> >
> > "%" SIZE_SPECIFIER to be portable.
>
> Do recent msvc versions still need this? We don't really support 2012
> and older anymore, so maybe %zu (and not %zd as size_t is unsigned) is
> enough.
>
As far as I can tell, 2015 still needs it. 2017 supports z.
- Hendrik
More information about the ffmpeg-devel
mailing list