[FFmpeg-cvslog] avformat/matroskadec: Add assert to silence Coverity false positive

Andreas Rheinhardt git at videolan.org
Fri May 31 15:29:56 EEST 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri May 24 09:29:24 2024 +0200| [996e0a57cad35d6ec5c6eef845628e7c8be240e0] | committer: Andreas Rheinhardt

avformat/matroskadec: Add assert to silence Coverity false positive

Helps with Coverity issue #1452453.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavformat/matroskadec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 2f07e11d87..13959f8b3d 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1315,6 +1315,8 @@ static int ebml_parse(MatroskaDemuxContext *matroska,
                     matroska->num_levels--;
                     return LEVEL_ENDED;
                 }
+                // We have not encountered a known element; syntax is a sentinel.
+                av_assert1(syntax->type == EBML_NONE);
             };
         }
 



More information about the ffmpeg-cvslog mailing list