[FFmpeg-cvslog] avformat/iamf_writer: fix layout checks when demixing_info is not present

James Almer git at videolan.org
Wed Jun 25 01:50:02 EEST 2025


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Jun 24 19:49:18 2025 -0300| [61773e761ee1ae1659357faeb26fc9fedfad9721] | committer: James Almer

avformat/iamf_writer: fix layout checks when demixing_info is not present

Fixes -Wtautological-overlap-compare warnings

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=61773e761ee1ae1659357faeb26fc9fedfad9721
---

 libavformat/iamf_writer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/iamf_writer.c b/libavformat/iamf_writer.c
index 4302df7931..f88987790d 100644
--- a/libavformat/iamf_writer.c
+++ b/libavformat/iamf_writer.c
@@ -771,7 +771,7 @@ static int iamf_write_audio_element(const IAMFContext *iamf,
                 get_loudspeaker_layout(element->layers[element->nb_layers-1], &layout, &expanded_layout);
                 /* When the highest loudspeaker_layout of the scalable channel audio (i.e., num_layers > 1) is greater than 3.1.2ch,
                  * (i.e., 5.1.2ch, 5.1.4ch, 7.1.2ch, or 7.1.4ch), type PARAMETER_DEFINITION_DEMIXING SHALL be present. */
-                if (layout == 3 && layout == 4 && layout == 6 && layout == 7) {
+                if (layout == 3 || layout == 4 || layout == 6 || layout == 7) {
                     av_log(log_ctx, AV_LOG_ERROR, "demixing_info needed but not set in Stream Group #%u\n",
                            audio_element->audio_element_id);
                     return AVERROR(EINVAL);



More information about the ffmpeg-cvslog mailing list