[FFmpeg-cvslog] lavc/utils: change a few asserts to av_assert0()

Michael Niedermayer git at videolan.org
Tue May 8 02:36:15 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue May  8 02:25:14 2012 +0200| [011004152f6d92646f769d609ac841c884ff6bb3] | committer: Michael Niedermayer

lavc/utils: change a few asserts to av_assert0()

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

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

 libavcodec/utils.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index ce60d4f..a2ffdb8 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -554,7 +554,7 @@ void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic){
     InternalBuffer *buf, *last;
     AVCodecInternal *avci = s->internal;
 
-    assert(s->codec_type == AVMEDIA_TYPE_VIDEO);
+    av_assert0(s->codec_type == AVMEDIA_TYPE_VIDEO);
 
     assert(pic->type==FF_BUFFER_TYPE_INTERNAL);
     assert(avci->buffer_count);
@@ -566,7 +566,7 @@ void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic){
             if (buf->data[0] == pic->data[0])
                 break;
         }
-        assert(i < avci->buffer_count);
+        av_assert0(i < avci->buffer_count);
         avci->buffer_count--;
         last = &avci->buffer[avci->buffer_count];
 
@@ -589,7 +589,7 @@ int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){
     AVFrame temp_pic;
     int i;
 
-    assert(s->codec_type == AVMEDIA_TYPE_VIDEO);
+    av_assert0(s->codec_type == AVMEDIA_TYPE_VIDEO);
 
     if (pic->data[0] && (pic->width != s->width || pic->height != s->height || pic->format != s->pix_fmt)) {
         av_log(s, AV_LOG_WARNING, "Picture changed from size:%dx%d fmt:%s to size:%dx%d fmt:%s in reget buffer()\n",



More information about the ffmpeg-cvslog mailing list