[FFmpeg-cvslog] h261enc: use av_assert

Michael Niedermayer git at videolan.org
Thu Jun 7 21:35:36 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Jun  7 21:32:32 2012 +0200| [b4d44367bc45b7bafd61c4bf59434bc517a6a440] | committer: Michael Niedermayer

h261enc: use av_assert

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4d44367bc45b7bafd61c4bf59434bc517a6a440
---

 libavcodec/h261enc.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c
index a91652c..8ebabe0 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);



More information about the ffmpeg-cvslog mailing list