Mercurial > libavcodec.hg
changeset 2826:08cf92c2f7c0 libavcodec
tinfoil patch: accept no widths that are no multiples of 4
author | melanson |
---|---|
date | Sat, 13 Aug 2005 17:12:38 +0000 |
parents | faa53103dde0 |
children | deaf39d8381b |
files | cyuv.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/cyuv.c Sat Aug 13 16:59:01 2005 +0000 +++ b/cyuv.c Sat Aug 13 17:12:38 2005 +0000 @@ -51,6 +51,9 @@ 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;