[FFmpeg-cvslog] matroskaenc: switch to av_assert

Michael Niedermayer git at videolan.org
Fri Jul 13 18:05:56 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jul 13 17:03:57 2012 +0200| [c5cc94982dcd2783b6498e0b38b8bbf676919438] | committer: Michael Niedermayer

matroskaenc: switch to av_assert

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

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

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

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index a08071f..0a59636 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -128,7 +128,7 @@ static void put_ebml_id(AVIOContext *pb, unsigned int id)
  */
 static void put_ebml_size_unknown(AVIOContext *pb, int bytes)
 {
-    assert(bytes <= 8);
+    av_assert0(bytes <= 8);
     avio_w8(pb, 0x1ff >> bytes);
     while (--bytes)
         avio_w8(pb, 0xff);
@@ -155,14 +155,14 @@ static void put_ebml_num(AVIOContext *pb, uint64_t num, int bytes)
     int i, needed_bytes = ebml_num_size(num);
 
     // sizes larger than this are currently undefined in EBML
-    assert(num < (1ULL<<56)-1);
+    av_assert0(num < (1ULL<<56)-1);
 
     if (bytes == 0)
         // don't care how many bytes are used, so use the min
         bytes = needed_bytes;
     // the bytes needed to write the given size would exceed the bytes
     // that we need to use, so write unknown size. This shouldn't happen.
-    assert(bytes >= needed_bytes);
+    av_assert0(bytes >= needed_bytes);
 
     num |= 1ULL << bytes*7;
     for (i = bytes - 1; i >= 0; i--)
@@ -211,7 +211,7 @@ static void put_ebml_void(AVIOContext *pb, uint64_t size)
 {
     int64_t currentpos = avio_tell(pb);
 
-    assert(size >= 2);
+    av_assert0(size >= 2);
 
     put_ebml_id(pb, EBML_ID_VOID);
     // we need to subtract the length needed to store the size from the



More information about the ffmpeg-cvslog mailing list