From 0c03f4c6b9990d22622c58e5e45f9ce7aac939da Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Thu, 21 Dec 2023 12:22:42 +0100 Subject: [PATCH] avformat/iamfenc: fix logical coding error --- libavformat/iamfenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/iamfenc.c b/libavformat/iamfenc.c index 0a043ce3a0..1de416b663 100644 --- a/libavformat/iamfenc.c +++ b/libavformat/iamfenc.c @@ -88,7 +88,7 @@ static int iamf_init(AVFormatContext *s) if (stg->type == AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION) nb_mix_presentations++; } - if ((nb_audio_elements < 1 && nb_audio_elements > 2) || nb_mix_presentations < 1) { + if ((nb_audio_elements < 1 || nb_audio_elements > 2) || nb_mix_presentations < 1) { av_log(s, AV_LOG_ERROR, "There must be >= 1 and <= 2 IAMF_AUDIO_ELEMENT and at least " "one IAMF_MIX_PRESENTATION stream groups\n"); return AVERROR(EINVAL);