[FFmpeg-cvslog] avformat/iamfenc: fix logical coding error

Paul B Mahol git at videolan.org
Thu Dec 21 17:23:31 EET 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Dec 21 12:22:42 2023 +0100| [0c03f4c6b9990d22622c58e5e45f9ce7aac939da] | committer: James Almer

avformat/iamfenc: fix logical coding error

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

 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);



More information about the ffmpeg-cvslog mailing list