Commit 6b892a42 authored by Mike Melanson's avatar Mike Melanson

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

Originally committed as revision 4512 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 3c8c94b4
...@@ -51,6 +51,9 @@ static int cyuv_decode_init(AVCodecContext *avctx) ...@@ -51,6 +51,9 @@ static int cyuv_decode_init(AVCodecContext *avctx)
s->avctx = avctx; s->avctx = avctx;
s->width = avctx->width; 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; s->height = avctx->height;
avctx->pix_fmt = PIX_FMT_YUV411P; avctx->pix_fmt = PIX_FMT_YUV411P;
avctx->has_b_frames = 0; avctx->has_b_frames = 0;
......
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