summaryrefslogtreecommitdiff
path: root/libavcodec/truemotion1.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/truemotion1.c')
-rw-r--r--libavcodec/truemotion1.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c
index b52a369d44..eed3a37bba 100644
--- a/libavcodec/truemotion1.c
+++ b/libavcodec/truemotion1.c
@@ -402,6 +402,10 @@ static int truemotion1_decode_header(TrueMotion1Context *s)
new_pix_fmt = AV_PIX_FMT_RGB555; // RGB565 is supported as well
s->w >>= width_shift;
+ if (s->w & 1) {
+ avpriv_request_sample(s->avctx, "Frame with odd width");
+ return AVERROR_PATCHWELCOME;
+ }
if (s->w != s->avctx->width || s->h != s->avctx->height ||
new_pix_fmt != s->avctx->pix_fmt) {