changeset 7765:72d421816e07 libavcodec

Warn the user about me_method values that are not supported. Fixes issue503
author michael
date Sun, 31 Aug 2008 23:55:47 +0000
parents a34931a8fea9
children 10242bdaac34
files motion_est.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/motion_est.c	Sun Aug 31 22:49:42 2008 +0000
+++ b/motion_est.c	Sun Aug 31 23:55:47 2008 +0000
@@ -240,6 +240,10 @@
         av_log(s->avctx, AV_LOG_ERROR, "ME_MAP size is too small for SAB diamond\n");
         return -1;
     }
+    if(s->me_method!=ME_ZERO && s->me_method!=ME_EPZS && s->me_method!=ME_X1){
+        av_log(s->avctx, AV_LOG_ERROR, "me_method is only allowed to be set to zero and epzs; for hex,umh,full and others see dia_size\n");
+        return -1;
+    }
 
     c->avctx= s->avctx;