diff options
author | Mark Thompson <sw@jkqxz.net> | 2018-09-24 23:00:43 +0100 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2018-09-24 23:09:45 +0100 |
commit | feb1cf08ab393070cd3d830dc7006100de487b74 (patch) | |
tree | adb80971d9f8b0a5d1d8945889305b995b366ca2 | |
parent | 321294adb788b5e143fcec776cdf1daf79ed921c (diff) | |
download | ffmpeg-feb1cf08ab393070cd3d830dc7006100de487b74.tar.gz |
lavc/h265_profile_level: Avoid integer overflow in bitrate
Fixes CIDs #1439659 and #1439660.
-rw-r--r-- | libavcodec/h265_profile_level.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h265_profile_level.c b/libavcodec/h265_profile_level.c index aac1529c9b..bc67fdc951 100644 --- a/libavcodec/h265_profile_level.c +++ b/libavcodec/h265_profile_level.c @@ -224,7 +224,7 @@ const H265LevelDescriptor *ff_h265_guess_level(const H265RawProfileTierLevel *pt max_br = level->max_br_main; if (!max_br) continue; - if (bitrate > profile->cpb_nal_factor * hbr_factor * max_br) + if (bitrate > (int64_t)profile->cpb_nal_factor * hbr_factor * max_br) continue; if (pic_size < (level->max_luma_ps >> 2)) |