diff mbox

[FFmpeg-devel,2/2] avcodec/mpegvideo_enc: Use av_assert1() instead of assert()

Message ID 20190201223335.720-2-michael@niedermayer.cc
State New
Headers show

Commit Message

Michael Niedermayer Feb. 1, 2019, 10:33 p.m. UTC
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/mpegvideo_enc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Michael Niedermayer Feb. 17, 2019, 8:19 a.m. UTC | #1
On Fri, Feb 01, 2019 at 11:33:35PM +0100, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavcodec/mpegvideo_enc.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

will apply

[...]
diff mbox

Patch

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index c5480e17c4..4fa628b741 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1948,7 +1948,7 @@  FF_ENABLE_DEPRECATION_WARNINGS
                                        s->pict_type);
 
         if (s->avctx->flags & AV_CODEC_FLAG_PASS1)
-            assert(put_bits_count(&s->pb) == s->header_bits + s->mv_bits +
+            av_assert1(put_bits_count(&s->pb) == s->header_bits + s->mv_bits +
                                              s->misc_bits + s->i_tex_bits +
                                              s->p_tex_bits);
         flush_put_bits(&s->pb);
@@ -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);
     }
 }