[FFmpeg-devel] [PATCH 1/3] avformat/moflex: Initialize format

Michael Niedermayer michael at niedermayer.cc
Fri May 21 00:25:47 EEST 2021


Fixes: CID1477423 Uninitialized scalar variable

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavformat/moflex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/moflex.c b/libavformat/moflex.c
index 0adb5f4864..dd4e7e0726 100644
--- a/libavformat/moflex.c
+++ b/libavformat/moflex.c
@@ -172,7 +172,7 @@ static int moflex_read_sync(AVFormatContext *s)
         unsigned type, ssize, codec_id = 0;
         unsigned codec_type, width = 0, height = 0, sample_rate = 0, channels = 0;
         int stream_index = -1;
-        int format;
+        int format = AV_PIX_FMT_NONE;
         AVRational fps;
 
         read_var_byte(s, &type);
-- 
2.17.1



More information about the ffmpeg-devel mailing list