Commit 5299ee54 authored by Michael Niedermayer's avatar Michael Niedermayer

h264: assert that croping values at slice level are consistent

These values where checked before already.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c3bd306e
...@@ -3055,6 +3055,8 @@ static int init_dimensions(H264Context *h) ...@@ -3055,6 +3055,8 @@ static int init_dimensions(H264Context *h)
{ {
int width = h->width - (h->sps.crop_right + h->sps.crop_left); int width = h->width - (h->sps.crop_right + h->sps.crop_left);
int height = h->height - (h->sps.crop_top + h->sps.crop_bottom); int height = h->height - (h->sps.crop_top + h->sps.crop_bottom);
av_assert0(h->sps.crop_right + h->sps.crop_left < (unsigned)h->width);
av_assert0(h->sps.crop_top + h->sps.crop_bottom < (unsigned)h->height);
/* handle container cropping */ /* handle container cropping */
if (!h->sps.crop && if (!h->sps.crop &&
......
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