summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/cyuv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libffmpeg/libavcodec/cyuv.c')
-rw-r--r--src/libffmpeg/libavcodec/cyuv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libffmpeg/libavcodec/cyuv.c b/src/libffmpeg/libavcodec/cyuv.c
index 82bc21005..34de8cc04 100644
--- a/src/libffmpeg/libavcodec/cyuv.c
+++ b/src/libffmpeg/libavcodec/cyuv.c
@@ -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;