PR #21270 opened by James Almer (jamrial) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21270 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21270.patch
Fixes compilation with gcc-tsan and --disable-optimizations. >From bb334f05b967673fb7caeb8dcc6469927cc03ddc Mon Sep 17 00:00:00 2001 From: James Almer <[email protected]> Date: Mon, 22 Dec 2025 22:19:01 -0300 Subject: [PATCH 1/3] fftools/ffmpeg_enc: use av_unreachable instead of av_assert0(0) at the end of a non-void function Fixes compilation with gcc-tsan and --disable-optimizations Signed-off-by: James Almer <[email protected]> --- fftools/ffmpeg_enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index 0f7d961472..a595912933 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -728,7 +728,7 @@ static int encode_frame(OutputFile *of, OutputStream *ost, AVFrame *frame, } } - av_assert0(0); + av_unreachable("encode_frame() loop should return"); } static enum AVPictureType forced_kf_apply(void *logctx, KeyframeForceCtx *kf, -- 2.49.1 >From 3d6ee50fb545dd6dcc2519ecbe5cb52450a53d8b Mon Sep 17 00:00:00 2001 From: James Almer <[email protected]> Date: Mon, 22 Dec 2025 22:19:11 -0300 Subject: [PATCH 2/3] fftools/ffmpeg_sched: use av_unreachable instead of av_assert0(0) at the end of a non-void function Fixes compilation with gcc-tsan and --disable-optimizations Signed-off-by: James Almer <[email protected]> --- fftools/ffmpeg_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg_sched.c b/fftools/ffmpeg_sched.c index c5ee6971f1..0d820acb8e 100644 --- a/fftools/ffmpeg_sched.c +++ b/fftools/ffmpeg_sched.c @@ -2654,7 +2654,7 @@ static int task_cleanup(Scheduler *sch, SchedulerNode node) case SCH_NODE_TYPE_DEC: return dec_done (sch, node.idx); case SCH_NODE_TYPE_ENC: return enc_done (sch, node.idx); case SCH_NODE_TYPE_FILTER_IN: return filter_done(sch, node.idx); - default: av_assert0(0); + default: av_unreachable("Invalid node type?"); } } -- 2.49.1 >From 39ab9effb99651f5fbc289c420e784944485c4cc Mon Sep 17 00:00:00 2001 From: James Almer <[email protected]> Date: Mon, 22 Dec 2025 22:19:37 -0300 Subject: [PATCH 3/3] avcodec/cbs_apv: use av_unreachable instead of av_assert0(0) at the end of a non-void function Fixes compilation with gcc-tsan and --disable-optimizations Signed-off-by: James Almer <[email protected]> --- libavcodec/cbs_apv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cbs_apv.c b/libavcodec/cbs_apv.c index be52c2e511..f6f701b9dd 100644 --- a/libavcodec/cbs_apv.c +++ b/libavcodec/cbs_apv.c @@ -33,7 +33,7 @@ static int cbs_apv_get_num_comp(const APVRawFrameHeader *fh) case APV_CHROMA_FORMAT_4444: return 4; default: - av_assert0(0 && "Invalid chroma_format_idc"); + av_unreachable("Invalid chroma_format_idc"); } } -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
