aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-30 20:59:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-30 21:11:49 +0200
commit2e9dcb82e5d54f54befe3c42b4d0bc9a6bd47016 (patch)
treecca664f41bca8250f1d782a706c92a3c63effd47
parent185e76976e8291d42f82972d0b7e103ef4b2d8cd (diff)
parent3e3056f2a020dd77efdf379dbd4c06a65b4a499a (diff)
downloadffmpeg-2e9dcb82e5d54f54befe3c42b4d0bc9a6bd47016.tar.gz
Merge commit '3e3056f2a020dd77efdf379dbd4c06a65b4a499a'
* commit '3e3056f2a020dd77efdf379dbd4c06a65b4a499a': h264: Allow stream and container cropping at the same time Conflicts: libavcodec/h264_slice.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/h264_slice.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 35ef7bf8d3..4b6c2170d0 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -975,15 +975,12 @@ 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 (!crop_present &&
- FFALIGN(h->avctx->width, 16) == h->width &&
- FFALIGN(h->avctx->height, 16) == h->height) {
+ if (FFALIGN(h->avctx->width, 16) == FFALIGN(width, 16) &&
+ FFALIGN(h->avctx->height, 16) == FFALIGN(height, 16)) {
width = h->avctx->width;
height = h->avctx->height;
}