[FFmpeg-cvslog] avcodec/decode: decode_simple_internal() only implements audio and video

Michael Niedermayer git at videolan.org
Sat May 25 01:57:19 EEST 2024


ffmpeg | branch: release/6.1 | Michael Niedermayer <michael at niedermayer.cc> | Fri May  3 21:51:42 2024 +0200| [3ee5567c545951545e5c85ef7854cbb3ece590fa] | committer: Michael Niedermayer

avcodec/decode: decode_simple_internal() only implements audio and video

Fixes: CID1538861 Uninitialized scalar variable

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit e9bb586543d83fe0ed901834b853b6d64e327529)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/decode.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 2cfb3fcf97..4c32bfb917 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -449,7 +449,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
     } else if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) {
         ret =  !got_frame ? AVERROR(EAGAIN)
                           : discard_samples(avctx, frame, discarded_samples);
-    }
+    } else
+        av_assert0(0);
 
     if (ret == AVERROR(EAGAIN))
         av_frame_unref(frame);



More information about the ffmpeg-cvslog mailing list