From c5cc94982dcd2783b6498e0b38b8bbf676919438 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 13 Jul 2012 17:03:57 +0200 Subject: [PATCH] matroskaenc: switch to av_assert Signed-off-by: Michael Niedermayer --- libavformat/matroskaenc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index a08071f083..0a5963607d 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