summaryrefslogtreecommitdiff
path: root/libavcodec/motion_est.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-04-30 18:09:24 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-04-30 18:09:24 +0000
commit1545aceaaf3a817117c650233c676b9f252342ab (patch)
treee9a808d6a1dcf41743d39bfdd2f45af70bb8cdfc /libavcodec/motion_est.c
parenteea8c08fa82791378bd33769992a7435409394b7 (diff)
dont missuse assert()
Originally committed as revision 3096 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/motion_est.c')
-rw-r--r--libavcodec/motion_est.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index f194a4d600..6aeedd5b90 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -1002,7 +1002,10 @@ static inline int check_input_motion(MpegEncContext * s, int mb_x, int mb_y, int
c->stride<<=1;
c->uvstride<<=1;
- assert(s->flags & CODEC_FLAG_INTERLACED_ME);
+ if(!(s->flags & CODEC_FLAG_INTERLACED_ME)){
+ av_log(s->avctx, AV_LOG_ERROR, "Interlaced macroblock selected but interlaced motion estimation disabled\n");
+ return -1;
+ }
if(USES_LIST(mb_type, 0)){
int field_select0= p->ref_index[0][xy ];
@@ -1060,7 +1063,10 @@ static inline int check_input_motion(MpegEncContext * s, int mb_x, int mb_y, int
c->stride>>=1;
c->uvstride>>=1;
}else if(IS_8X8(mb_type)){
- assert(s->flags & CODEC_FLAG_4MV);
+ if(!(s->flags & CODEC_FLAG_4MV)){
+ av_log(s->avctx, AV_LOG_ERROR, "4MV macroblock selected but 4MV encoding disabled\n");
+ return -1;
+ }
cmpf= s->dsp.sse[1];
chroma_cmpf= s->dsp.sse[1];
init_mv4_ref(s);