From b4d44367bc45b7bafd61c4bf59434bc517a6a440 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 7 Jun 2012 21:32:32 +0200 Subject: [PATCH] h261enc: use av_assert Signed-off-by: Michael Niedermayer --- libavcodec/h261enc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c index a91652cd43..8ebabe0560 100644 --- a/libavcodec/h261enc.c +++ b/libavcodec/h261enc.c @@ -25,6 +25,7 @@ * H.261 encoder. */ +#include "libavutil/avassert.h" #include "dsputil.h" #include "avcodec.h" #include "mpegvideo.h" @@ -194,7 +195,7 @@ void ff_h261_encode_mb(MpegEncContext * s, h->mtype+=3; if(cbp || s->dquant) h->mtype++; - assert(h->mtype > 1); + av_assert1(h->mtype > 1); } if(s->dquant) @@ -221,7 +222,7 @@ void ff_h261_encode_mb(MpegEncContext * s, h->previous_mba = h->current_mba; if(HAS_CBP(h->mtype)){ - assert(cbp>0); + av_assert1(cbp>0); put_bits(&s->pb,ff_h261_cbp_tab[cbp-1][1],ff_h261_cbp_tab[cbp-1][0]); } for(i=0; i<6; i++) { @@ -307,8 +308,8 @@ static void h261_encode_block(H261Context * h, DCTELEM * block, int n){ put_bits(&s->pb, rl->table_vlc[code][1], rl->table_vlc[code][0]); if (code == rl->n) { put_bits(&s->pb, 6, run); - assert(slevel != 0); - assert(level <= 127); + av_assert1(slevel != 0); + av_assert1(level <= 127); put_sbits(&s->pb, 8, slevel); } else { put_bits(&s->pb, 1, sign);