summaryrefslogtreecommitdiff
path: root/libavcodec/hevc_ps.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/hevc_ps.c')
-rw-r--r--libavcodec/hevc_ps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 6a1a8f60a9..3d4f3e7ffb 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -1123,8 +1123,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
sps->qp_bd_offset = 6 * (sps->bit_depth - 8);
- if (sps->width & ((1 << sps->log2_min_cb_size) - 1) ||
- sps->height & ((1 << sps->log2_min_cb_size) - 1)) {
+ if (av_mod_uintp2(sps->width, sps->log2_min_cb_size) ||
+ av_mod_uintp2(sps->height, sps->log2_min_cb_size)) {
av_log(s->avctx, AV_LOG_ERROR, "Invalid coded frame dimensions.\n");
goto err;
}