tinfoil patch: accept no widths that are no multiples of 4

Originally committed as revision 4512 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Mike Melanson 2005-08-13 17:12:38 +00:00
parent 3c8c94b403
commit 6b892a4227
1 changed files with 3 additions and 0 deletions

View File

@ -51,6 +51,9 @@ static int cyuv_decode_init(AVCodecContext *avctx)
s->avctx = avctx;
s->width = avctx->width;
/* width needs to be divisible by 4 for this codec to work */
if (s->width & 0x3)
return -1;
s->height = avctx->height;
avctx->pix_fmt = PIX_FMT_YUV411P;
avctx->has_b_frames = 0;