diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-19 15:08:44 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-19 15:18:31 +0100 |
commit | 869b56cae6e08c48c32033a8644907739198721d (patch) | |
tree | bd7a4d767fb24e5b3286a131ac653d5fd3dc3f9a | |
parent | b44ae59b70913244e5c33d54a2662fd9b2aed7fa (diff) | |
download | ffmpeg-869b56cae6e08c48c32033a8644907739198721d.tar.gz |
avformat/mpegenc: replace always enabled asserts by av_assert0()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mpegenc.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index b1515064e8..f0fe7714c6 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -35,9 +35,6 @@ #define MAX_PAYLOAD_SIZE 4096 -#undef NDEBUG -#include <assert.h> - typedef struct PacketDesc { int64_t pts; int64_t dts; @@ -874,7 +871,7 @@ static int flush_packet(AVFormatContext *ctx, int stream_index, } /* output data */ - assert(payload_size - stuffing_size <= av_fifo_size(stream->fifo)); + av_assert0(payload_size - stuffing_size <= av_fifo_size(stream->fifo)); av_fifo_generic_read(stream->fifo, ctx->pb, payload_size - stuffing_size, (void (*)(void*, void*, int))avio_write); @@ -1028,14 +1025,14 @@ retry: goto retry; } - assert(best_i >= 0); + av_assert0(best_i >= 0); st = ctx->streams[best_i]; stream = st->priv_data; - assert(av_fifo_size(stream->fifo) > 0); + av_assert0(av_fifo_size(stream->fifo) > 0); - assert(avail_space >= s->packet_size || ignore_constraints); + av_assert0(avail_space >= s->packet_size || ignore_constraints); timestamp_packet = stream->premux_packet; if (timestamp_packet->unwritten_size == timestamp_packet->size) { @@ -1053,7 +1050,7 @@ retry: es_size = flush_packet(ctx, best_i, timestamp_packet->pts, timestamp_packet->dts, scr, trailer_size); } else { - assert(av_fifo_size(stream->fifo) == trailer_size); + av_assert0(av_fifo_size(stream->fifo) == trailer_size); es_size = flush_packet(ctx, best_i, AV_NOPTS_VALUE, AV_NOPTS_VALUE, scr, trailer_size); } @@ -1186,7 +1183,7 @@ static int mpeg_mux_end(AVFormatContext *ctx) for (i = 0; i < ctx->nb_streams; i++) { stream = ctx->streams[i]->priv_data; - assert(av_fifo_size(stream->fifo) == 0); + av_assert0(av_fifo_size(stream->fifo) == 0); av_fifo_freep(&stream->fifo); } return 0; |