]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/msvideo1enc.c
mlpdec: fix channel order for wide 7.1 truehd layouts
[ffmpeg] / libavcodec / msvideo1enc.c
index 0b6d47460432bd7d9c69609abe1ab3e972173b6b..09cc7a196d357c3807ef51ff0c840bffe342f8c3 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 /**
- * @file msvideo1enc.c
+ * @file
  * Microsoft Video-1 encoder
  */
 
@@ -261,6 +261,10 @@ static av_cold int encode_init(AVCodecContext *avctx)
     if (av_image_check_size(avctx->width, avctx->height, 0, avctx) < 0) {
         return -1;
     }
+    if((avctx->width&3) || (avctx->height&3)){
+        av_log(avctx, AV_LOG_ERROR, "width and height must be multiplies of 4\n");
+        return -1;
+    }
 
     avcodec_get_frame_defaults(&c->pic);
     avctx->coded_frame = (AVFrame*)&c->pic;