[FFmpeg-cvslog] libvorbisenc: switch to av_assert

Michael Niedermayer git at videolan.org
Mon Jul 23 04:04:01 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jul 23 04:00:23 2012 +0200| [d014e19515a3a46db0034d58f5af0d335827ba93] | committer: Michael Niedermayer

libvorbisenc: switch to av_assert

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

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

 libavcodec/libvorbisenc.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c
index 973b3d2..a1fb728 100644
--- a/libavcodec/libvorbisenc.c
+++ b/libavcodec/libvorbisenc.c
@@ -20,6 +20,7 @@
 
 #include <vorbis/vorbisenc.h>
 
+#include "libavutil/avassert.h"
 #include "libavutil/fifo.h"
 #include "libavutil/opt.h"
 #include "avcodec.h"
@@ -28,8 +29,6 @@
 #include "vorbis.h"
 #include "vorbis_parser.h"
 
-#undef NDEBUG
-#include <assert.h>
 
 /* Number of samples the user should send in each call.
  * This value is used because it is the LCD of all possible frame sizes, so
@@ -250,7 +249,7 @@ static av_cold int oggvorbis_encode_init(AVCodecContext *avctx)
     offset += header_comm.bytes;
     memcpy(&p[offset], header_code.packet, header_code.bytes);
     offset += header_code.bytes;
-    assert(offset == avctx->extradata_size);
+    av_assert0(offset == avctx->extradata_size);
 
     if ((ret = avpriv_vorbis_parse_extradata(avctx, &s->vp)) < 0) {
         av_log(avctx, AV_LOG_ERROR, "invalid extradata\n");



More information about the ffmpeg-cvslog mailing list