Merge commit 'a7153444df9040bf6ae103e0bbf6104b66f974cb'

* commit 'a7153444df9040bf6ae103e0bbf6104b66f974cb':
  huffyuvdec: check width size for yuv422p

Conflicts:
	libavcodec/huffyuvdec.c

See: 6abb9a901f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-08-06 00:07:08 +02:00
commit 296b01d7f9
1 changed files with 5 additions and 2 deletions

View File

@ -523,10 +523,13 @@ static av_cold int decode_init(AVCodecContext *avctx)
av_log(avctx, AV_LOG_ERROR, "width must be even for this colorspace\n");
return AVERROR_INVALIDDATA;
}
if (s->predictor == MEDIAN && avctx->pix_fmt == AV_PIX_FMT_YUV422P && avctx->width%4) {
av_log(avctx, AV_LOG_ERROR, "width must be a multiple of 4 this colorspace and predictor\n");
if (s->predictor == MEDIAN && avctx->pix_fmt == AV_PIX_FMT_YUV422P &&
avctx->width % 4) {
av_log(avctx, AV_LOG_ERROR, "width must be a multiple of 4 "
"for this combination of colorspace and predictor type.\n");
return AVERROR_INVALIDDATA;
}
if ((ret = ff_huffyuv_alloc_temp(s)) < 0) {
ff_huffyuv_common_end(s);
return ret;