[FFmpeg-cvslog] fftools/ffmpeg_enc: Initialize Decoder

Michael Niedermayer git at videolan.org
Tue Jul 2 23:00:50 EEST 2024


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Apr 27 23:42:33 2024 +0200| [935d9a57120b5b322555af611d3871ce3084bbf1] | committer: Michael Niedermayer

fftools/ffmpeg_enc: Initialize Decoder

Fixes: CID1591439 Uninitialized pointer read

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 fftools/ffmpeg_enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c
index 0b3f3f101a..928114c20f 100644
--- a/fftools/ffmpeg_enc.c
+++ b/fftools/ffmpeg_enc.c
@@ -168,7 +168,7 @@ int enc_open(void *opaque, const AVFrame *frame)
     InputStream *ist = ost->ist;
     Encoder              *e = ost->enc;
     AVCodecContext *enc_ctx = ost->enc_ctx;
-    Decoder            *dec;
+    Decoder            *dec = NULL;
     const AVCodec      *enc = enc_ctx->codec;
     OutputFile          *of = ost->file;
     FrameData *fd;



More information about the ffmpeg-cvslog mailing list