summaryrefslogtreecommitdiff
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
authorLimin Wang <lance.lmwang@gmail.com>2020-04-18 12:52:49 +0800
committerLimin Wang <lance.lmwang@gmail.com>2020-05-08 06:42:25 +0800
commit8b077511238e97d8657fb58551befc63cf5e29ed (patch)
treead5be65db141a5aa63a89d1d51125c8f030d55bc /libavcodec/libx264.c
parentf5e33514e7a879b09fabfeffd78402590225bf47 (diff)
avcodec/libx264: return error if unknown picture type encountered
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c3
1 files changed, 2 insertions, 1 deletions
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