[FFmpeg-devel] [PATCH v7 09/12] swscale: introduce new, dynamic scaling API
Niklas Haas
ffmpeg at haasn.xyz
Thu Nov 21 14:42:42 EET 2024
On Thu, 21 Nov 2024 02:12:28 +0100 Michael Niedermayer <michael at niedermayer.cc> wrote:
> > +static int validate_params(SwsContext *ctx)
> > +{
> > +#define VALIDATE(field, min, max) \
> > + if (ctx->field < min || ctx->field > max) { \
> > + av_log(ctx, AV_LOG_ERROR, "'%s' (%d) out of range [%d, %d]\n", \
> > + #field, (int) ctx->field, min, max); \
> > + return AVERROR(EINVAL); \
> > + }
> > +
>
> > + VALIDATE(threads, 0, 8192);
>
> a named "#define" would be better than a litteral number
Fixed.
>
> should be ok otherwise
>
> thx
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> If the United States is serious about tackling the national security threats
> related to an insecure 5G network, it needs to rethink the extent to which it
> values corporate profits and government espionage over security.-Bruce Schneier
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list