From 8b077511238e97d8657fb58551befc63cf5e29ed Mon Sep 17 00:00:00 2001 From: Limin Wang Date: Sat, 18 Apr 2020 12:52:49 +0800 Subject: avcodec/libx264: return error if unknown picture type encountered Signed-off-by: Limin Wang --- libavcodec/libx264.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavcodec/libx264.c') diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index c13e8a58d4..4121b2807a 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -476,7 +476,8 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, pict_type = AV_PICTURE_TYPE_B; break; default: - pict_type = AV_PICTURE_TYPE_NONE; + av_log(ctx, AV_LOG_ERROR, "Unknown picture type encountered.\n"); + return AVERROR_EXTERNAL; } #if FF_API_CODED_FRAME FF_DISABLE_DEPRECATION_WARNINGS -- cgit v1.2.3