[FFmpeg-cvslog] avcodec/mpegvideo_enc: Use av_assert1() instead of assert()

Michael Niedermayer git at videolan.org
Sun Feb 17 11:52:49 EET 2019


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Feb  1 22:53:53 2019 +0100| [7246bf365a1f2f12f1e7f1162aef8930924866dc] | committer: Michael Niedermayer

avcodec/mpegvideo_enc: Use av_assert1() instead of assert()

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/mpegvideo_enc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index c5480e17c4..ae3b131229 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -2005,7 +2005,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
                 av_log(s->avctx, AV_LOG_ERROR,
                        "Internal error, negative bits\n");
 
-            assert(s->repeat_first_field == 0);
+            av_assert1(s->repeat_first_field == 0);
 
             vbv_delay = bits * 90000 / s->avctx->rc_max_rate;
             min_delay = (minbits * 90000LL + s->avctx->rc_max_rate - 1) /
@@ -3056,7 +3056,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
                         if(r % d == 0){
                             current_packet_size=0;
                             s->pb.buf_ptr= s->ptr_lastgob;
-                            assert(put_bits_ptr(&s->pb) == s->ptr_lastgob);
+                            av_assert1(put_bits_ptr(&s->pb) == s->ptr_lastgob);
                         }
                     }
 
@@ -3642,11 +3642,11 @@ static void set_frame_distances(MpegEncContext * s){
 
     if(s->pict_type==AV_PICTURE_TYPE_B){
         s->pb_time= s->pp_time - (s->last_non_b_time - s->time);
-        assert(s->pb_time > 0 && s->pb_time < s->pp_time);
+        av_assert1(s->pb_time > 0 && s->pb_time < s->pp_time);
     }else{
         s->pp_time= s->time - s->last_non_b_time;
         s->last_non_b_time= s->time;
-        assert(s->picture_number==0 || s->pp_time > 0);
+        av_assert1(s->picture_number==0 || s->pp_time > 0);
     }
 }
 



More information about the ffmpeg-cvslog mailing list