Commit feb1cf08 authored by Mark Thompson's avatar Mark Thompson

lavc/h265_profile_level: Avoid integer overflow in bitrate

Fixes CIDs #1439659 and #1439660.
parent 321294ad
...@@ -224,7 +224,7 @@ const H265LevelDescriptor *ff_h265_guess_level(const H265RawProfileTierLevel *pt ...@@ -224,7 +224,7 @@ const H265LevelDescriptor *ff_h265_guess_level(const H265RawProfileTierLevel *pt
max_br = level->max_br_main; max_br = level->max_br_main;
if (!max_br) if (!max_br)
continue; continue;
if (bitrate > profile->cpb_nal_factor * hbr_factor * max_br) if (bitrate > (int64_t)profile->cpb_nal_factor * hbr_factor * max_br)
continue; continue;
if (pic_size < (level->max_luma_ps >> 2)) if (pic_size < (level->max_luma_ps >> 2))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment