[FFmpeg-cvslog] avformat/iamf_writer: remove bogus check

James Almer git at videolan.org
Tue Jan 23 15:14:36 EET 2024


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Jan 23 10:13:25 2024 -0300| [9813df77d68a43c1dbf4e5b0dc4a7e5eb525b5f9] | committer: James Almer

avformat/iamf_writer: remove bogus check

Probably an artifact of a rebase, as this check is done below.

Fixes "Conditional jump or move depends on uninitialised value(s)" errors as
reported by Valgrind.

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

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

 libavformat/iamf_writer.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/libavformat/iamf_writer.c b/libavformat/iamf_writer.c
index 9962845049..99602ae204 100644
--- a/libavformat/iamf_writer.c
+++ b/libavformat/iamf_writer.c
@@ -750,11 +750,6 @@ static int iamf_write_mixing_presentation(const IAMFContext *iamf,
             int album = submix_layout->album_anchored_loudness.num &&
                         submix_layout->album_anchored_loudness.den;
 
-            if (layout == FF_ARRAY_ELEMS(ff_iamf_sound_system_map)) {
-                av_log(log_ctx, AV_LOG_ERROR, "Invalid Sound System value in a submix\n");
-                return AVERROR(EINVAL);
-            }
-
             if (submix_layout->layout_type == AV_IAMF_SUBMIX_LAYOUT_TYPE_LOUDSPEAKERS) {
                 for (layout = 0; layout < FF_ARRAY_ELEMS(ff_iamf_sound_system_map); layout++) {
                     if (!av_channel_layout_compare(&submix_layout->sound_system, &ff_iamf_sound_system_map[layout].layout))



More information about the ffmpeg-cvslog mailing list