mirror of https://git.ffmpeg.org/ffmpeg.git
Merge commit '1329c08ad6d2ddb304858f2972c67b508e8b0f0e'
* commit '1329c08ad6d2ddb304858f2972c67b508e8b0f0e':
hevc: Validate the number of long term reference pictures
See ea38e5a6b7
Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
commit
36e0093dd9
|
@ -1075,8 +1075,8 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
|
|||
sps->long_term_ref_pics_present_flag = get_bits1(gb);
|
||||
if (sps->long_term_ref_pics_present_flag) {
|
||||
sps->num_long_term_ref_pics_sps = get_ue_golomb_long(gb);
|
||||
if (sps->num_long_term_ref_pics_sps > 31U) {
|
||||
av_log(avctx, AV_LOG_ERROR, "num_long_term_ref_pics_sps %d is out of range.\n",
|
||||
if (sps->num_long_term_ref_pics_sps > HEVC_MAX_LONG_TERM_REF_PICS) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Too many long term ref pics: %d.\n",
|
||||
sps->num_long_term_ref_pics_sps);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue