avcodec/libx264: return error if unknown picture type encountered

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
pull/338/head
Limin Wang 5 years ago
parent f5e33514e7
commit 8b07751123
  1. 3
      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

Loading…
Cancel
Save