* [FFmpeg-devel] [PATCH] avcodec/cbs_vp8: Don't leave out ... in calls to variadic macros
@ 2024-02-19 13:37 Andreas Rheinhardt
2024-02-21 17:04 ` Andreas Rheinhardt
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Rheinhardt @ 2024-02-19 13:37 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
It is undefined behaviour (see C11, 6.10.3 (4); see also
14dd0a9057019e97ff9438f6cc1502f6922acb85).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/cbs_vp8.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/libavcodec/cbs_vp8.c b/libavcodec/cbs_vp8.c
index eabdef358f..1f7e81cfe6 100644
--- a/libavcodec/cbs_vp8.c
+++ b/libavcodec/cbs_vp8.c
@@ -223,19 +223,19 @@ static int cbs_vp8_read_unsigned_le(CodedBitstreamContext *ctx, GetBitContext *g
#define SUBSCRIPTS(subs, ...) \
(subs > 0 ? ((int[subs + 1]){subs, __VA_ARGS__}) : NULL)
-#define f(width, name) xf(width, name, 0)
+#define f(width, name) xf(width, name, 0, )
// bool [de|en]coder methods.
-#define bc_f(width, name) bc_unsigned_subs(width, DEFAULT_PROB, true, name, 0)
-#define bc_s(width, name) bc_signed_subs(width, DEFAULT_PROB, name, 0)
+#define bc_f(width, name) bc_unsigned_subs(width, DEFAULT_PROB, true, name, 0, )
+#define bc_s(width, name) bc_signed_subs(width, DEFAULT_PROB, name, 0, )
#define bc_fs(width, name, subs, ...) \
bc_unsigned_subs(width, DEFAULT_PROB, true, name, subs, __VA_ARGS__)
#define bc_ss(width, name, subs, ...) \
bc_signed_subs(width, DEFAULT_PROB, name, subs, __VA_ARGS__)
// bool [de|en]coder methods for boolean value and disable tracing.
-#define bc_b(name) bc_unsigned_subs(1, DEFAULT_PROB, false, name, 0)
-#define bc_b_prob(prob, name) bc_unsigned_subs(1, prob, false, name, 0)
+#define bc_b(name) bc_unsigned_subs(1, DEFAULT_PROB, false, name, 0, )
+#define bc_b_prob(prob, name) bc_unsigned_subs(1, prob, false, name, 0, )
#define READ
#define READWRITE read
--
2.34.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/cbs_vp8: Don't leave out ... in calls to variadic macros
2024-02-19 13:37 [FFmpeg-devel] [PATCH] avcodec/cbs_vp8: Don't leave out ... in calls to variadic macros Andreas Rheinhardt
@ 2024-02-21 17:04 ` Andreas Rheinhardt
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Rheinhardt @ 2024-02-21 17:04 UTC (permalink / raw)
To: ffmpeg-devel
Andreas Rheinhardt:
> It is undefined behaviour (see C11, 6.10.3 (4); see also
> 14dd0a9057019e97ff9438f6cc1502f6922acb85).
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> libavcodec/cbs_vp8.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/libavcodec/cbs_vp8.c b/libavcodec/cbs_vp8.c
> index eabdef358f..1f7e81cfe6 100644
> --- a/libavcodec/cbs_vp8.c
> +++ b/libavcodec/cbs_vp8.c
> @@ -223,19 +223,19 @@ static int cbs_vp8_read_unsigned_le(CodedBitstreamContext *ctx, GetBitContext *g
> #define SUBSCRIPTS(subs, ...) \
> (subs > 0 ? ((int[subs + 1]){subs, __VA_ARGS__}) : NULL)
>
> -#define f(width, name) xf(width, name, 0)
> +#define f(width, name) xf(width, name, 0, )
>
> // bool [de|en]coder methods.
> -#define bc_f(width, name) bc_unsigned_subs(width, DEFAULT_PROB, true, name, 0)
> -#define bc_s(width, name) bc_signed_subs(width, DEFAULT_PROB, name, 0)
> +#define bc_f(width, name) bc_unsigned_subs(width, DEFAULT_PROB, true, name, 0, )
> +#define bc_s(width, name) bc_signed_subs(width, DEFAULT_PROB, name, 0, )
> #define bc_fs(width, name, subs, ...) \
> bc_unsigned_subs(width, DEFAULT_PROB, true, name, subs, __VA_ARGS__)
> #define bc_ss(width, name, subs, ...) \
> bc_signed_subs(width, DEFAULT_PROB, name, subs, __VA_ARGS__)
>
> // bool [de|en]coder methods for boolean value and disable tracing.
> -#define bc_b(name) bc_unsigned_subs(1, DEFAULT_PROB, false, name, 0)
> -#define bc_b_prob(prob, name) bc_unsigned_subs(1, prob, false, name, 0)
> +#define bc_b(name) bc_unsigned_subs(1, DEFAULT_PROB, false, name, 0, )
> +#define bc_b_prob(prob, name) bc_unsigned_subs(1, prob, false, name, 0, )
>
> #define READ
> #define READWRITE read
Will apply this patch tomorrow unless there are objections.
- Andreas
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-21 17:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19 13:37 [FFmpeg-devel] [PATCH] avcodec/cbs_vp8: Don't leave out ... in calls to variadic macros Andreas Rheinhardt
2024-02-21 17:04 ` Andreas Rheinhardt
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git