diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2020-04-18 12:52:47 +0800 |
---|---|---|
committer | Limin Wang <lance.lmwang@gmail.com> | 2020-05-08 06:42:25 +0800 |
commit | d8e98d93485754b746a7d1103f33a30de08022b7 (patch) | |
tree | 3d895028b5d55e1ed9d3709b14341b413f071b4d /libavcodec/libx265.c | |
parent | 8360fd26105f58fbec9fb8edeaa5755160c9994f (diff) |
avcodec/libx265: Fix Uninitialized scalar variable
return error if unknown picture type encountered
Fixes CID 1457234
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavcodec/libx265.c')
-rw-r--r-- | libavcodec/libx265.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 |