[FFmpeg-devel] [PATCH v7 1/1] avformat: Add IPFS protocol support.
Tomas Härdin
tjoppen at acc.umu.se
Mon Feb 21 15:17:18 EET 2022
tor 2022-02-17 klockan 15:26 +0100 skrev Mark Gaiser:
> >
> > > +
> > > + // Test $IPFS_GATEWAY.
> > > + if (getenv("IPFS_GATEWAY") != NULL) {
> > > + if (snprintf(c->gateway_buffer, sizeof(c-
> > > >gateway_buffer),
> > > "%s",
> > > + getenv("IPFS_GATEWAY")) >= sizeof(c-
> > > > gateway_buffer)) {
> > > + av_log(h, AV_LOG_ERROR, "The IPFS_GATEWAY
> > > environment
> > > variable exceeds the maximum length. We allow a max of %li
> > > characters\n", sizeof(c->gateway_buffer));
> >
> > nit: seems a bit weird to break the if but not the av_log()
> > Also this should be %zu not %li
> >
>
> The compiler doesn't complain about this one.
> How do you know %zu is right? I used this table and it knows nothing
> about
> %z...
> https://www.cplusplus.com/reference/cstdio/printf/
sizeof() returns size_t
/Tomas
More information about the ffmpeg-devel
mailing list