Hi On Wed, Dec 03, 2025 at 09:31:58PM +0000, John Nelson via ffmpeg-devel wrote: > This is a known issue apparently and been fixed in other places in the code > in a similar way - however, there is a check for isnan() in the same file, so > perhaps this won't work as well as the other cases. > > Thanks, > John
> h264_metadata.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > 2e8ff4b98142c5df9dad7aa72a6ed7cb7e8d4fb3 > /var0001-remove-NAN-from-const-initializer-that-s-causing-com.patch > From 03c0d37f6c8b0e8dc6f58ec50984c15f54dc6445 Mon Sep 17 00:00:00 2001 > From: John Nelson <[email protected]> > Date: Wed, 3 Dec 2025 13:27:57 -0800 > Subject: [PATCH] remove NAN from const initializer that's causing compile > errors in some cases > > --- > libavcodec/bsf/h264_metadata.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/bsf/h264_metadata.c b/libavcodec/bsf/h264_metadata.c > index 477f1b18b6..91a5004b96 100644 > --- a/libavcodec/bsf/h264_metadata.c > +++ b/libavcodec/bsf/h264_metadata.c > @@ -590,6 +590,7 @@ static int h264_metadata_init(AVBSFContext *bsf) > } > > #define OFFSET(x) offsetof(H264MetadataContext, x) > +#define DEFAULT 0.0 //should be NAN but it does not work as it is not a > constant in glibc as required by ANSI/ISO C > #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM) > static const AVOption h264_metadata_options[] = { > BSF_ELEMENT_OPTIONS_PIR("aud", "Access Unit Delimiter NAL units", > @@ -658,7 +659,7 @@ static const AVOption h264_metadata_options[] = { > > { "rotate", "Set rotation in display orientation SEI (anticlockwise > angle in degrees)", > OFFSET(rotate), AV_OPT_TYPE_DOUBLE, > - { .dbl = NAN }, -360.0, +360.0, FLAGS }, > + { .dbl = DEFAULT }, -360.0, +360.0, FLAGS }, > { "flip", "Set flip in display orientation SEI", how does this fail to build ? try to include float.h and math.h also if this originates from libavutil/mathematics.h, that define NAN there should be fixed to comply to the standard thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The day soldiers stop bringing you their problems is the day you have stopped leading them. They have either lost confidence that you can help or concluded you do not care. Either case is a failure of leadership. - Colin Powell
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
