diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c index 9eb252dffa..033bb79309 100644 --- a/libavcodec/h264_ps.c +++ b/libavcodec/h264_ps.c @@ -224,7 +224,9 @@ static inline int decode_vui_parameters(H264Context *h, SPS *sps) if (sps->num_reorder_frames > 16U /* max_dec_frame_buffering || max_dec_frame_buffering > 16 */) { av_log(h->avctx, AV_LOG_ERROR, - "illegal num_reorder_frames %d\n", sps->num_reorder_frames); + "Clipping illegal num_reorder_frames %d\n", + sps->num_reorder_frames); + sps->num_reorder_frames = 16; return AVERROR_INVALIDDATA; } }