Commit 570397c7 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'e87f5e4e'

* commit 'e87f5e4e':
  h264: fully check cropping amount from sps

Conflicts:
	libavcodec/h264_slice.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 9c41b594 e87f5e4e
......@@ -1109,11 +1109,13 @@ static int init_dimensions(H264Context *h)
{
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 crop_present = h->sps.crop_left || h->sps.crop_top ||
h->sps.crop_right || 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 */
if (!h->sps.crop &&
if (!crop_present &&
FFALIGN(h->avctx->width, 16) == h->width &&
FFALIGN(h->avctx->height, 16) == h->height) {
width = h->avctx->width;
......
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