]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dxa.c
lavc/flashsv2enc: Fix encoding resolution error message.
[ffmpeg] / libavcodec / dxa.c
index 0f64b5e61948bab8d10282a22b79f0c599845e73..c8e3f713998260a32a0a14935e22550301426ecf 100644 (file)
@@ -329,6 +329,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
 {
     DxaDecContext * const c = avctx->priv_data;
 
+    if (avctx->width%4 || avctx->height%4) {
+        avpriv_request_sample(avctx, "dimensions are not a multiple of 4");
+        return AVERROR_INVALIDDATA;
+    }
+
     c->prev = av_frame_alloc();
     if (!c->prev)
         return AVERROR(ENOMEM);