diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-02-20 18:47:46 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-02-20 19:00:23 +0100 |
commit | cffadfe99a1c41866701bab6c7410c17737a1db1 (patch) | |
tree | 8e415ab14063e5bff3b9451900c0f1203f680872 | |
parent | e2afcb82429a83c819f38c320c804f927b41c4d0 (diff) | |
download | ffmpeg-cffadfe99a1c41866701bab6c7410c17737a1db1.tar.gz |
avformat/movenc: Make check actually check what is intended
Also fixes a Clang warning:
"overlapping comparisons always evaluate to false
[-Wtautological-overlap-compare]"
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavformat/movenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c index afcee683cd..724a1eb673 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -7160,7 +7160,7 @@ static int mov_init_iamf_track(AVFormatContext *s) if (!nb_audio_elements && !nb_mix_presentations) return 0; - 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 to write a IMAF track\n"); return AVERROR(EINVAL); |