[FFmpeg-cvslog] avcodec/libx265: Fix Uninitialized scalar variable

Limin Wang git at videolan.org
Fri May 8 02:09:17 EEST 2020


ffmpeg | branch: master | Limin Wang <lance.lmwang at gmail.com> | Sat Apr 18 12:52:47 2020 +0800| [d8e98d93485754b746a7d1103f33a30de08022b7] | committer: Limin Wang

avcodec/libx265: Fix Uninitialized scalar variable

return error if unknown picture type encountered

Fixes CID 1457234
Signed-off-by: Limin Wang <lance.lmwang at gmail.com>

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

 libavcodec/libx265.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index e42c7b4d85..573ecc8cb0 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -550,6 +550,9 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     case X265_TYPE_BREF:
         pict_type = AV_PICTURE_TYPE_B;
         break;
+    default:
+        av_log(avctx, AV_LOG_ERROR, "Unknown picture type encountered.\n");
+        return AVERROR_EXTERNAL;
     }
 
 #if FF_API_CODED_FRAME



More information about the ffmpeg-cvslog mailing list