Commit d8e98d93 authored by Limin Wang's avatar Limin Wang

avcodec/libx265: Fix Uninitialized scalar variable

return error if unknown picture type encountered

Fixes CID 1457234
Signed-off-by: 's avatarLimin Wang <lance.lmwang@gmail.com>
parent 8360fd26
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment