aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-20 18:20:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-20 18:20:04 +0200
commit827667eca7c72a14b632c790ebfdf9a4276cf54e (patch)
tree2ade00eadefc48b9a61df9eb379a20f8510f4a5b
parent4eae08b43806d704e5a1d7cf8c5e33cad95b1c3e (diff)
downloadffmpeg-827667eca7c72a14b632c790ebfdf9a4276cf54e.tar.gz
mjpegenc: use av_assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mjpegenc.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index 068f15c821..66a975e97c 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -30,9 +30,6 @@
* MJPEG encoder.
*/
-//#define DEBUG
-#include <assert.h>
-
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
@@ -222,7 +219,7 @@ void ff_mjpeg_encode_picture_header(MpegEncContext *s)
switch(s->avctx->codec_id){
case CODEC_ID_MJPEG: put_marker(&s->pb, SOF0 ); break;
case CODEC_ID_LJPEG: put_marker(&s->pb, SOF3 ); break;
- default: assert(0);
+ default: av_assert0(0);
}
put_bits(&s->pb, 16, 17);
@@ -287,7 +284,7 @@ void ff_mjpeg_encode_picture_header(MpegEncContext *s)
switch(s->avctx->codec_id){
case CODEC_ID_MJPEG: put_bits(&s->pb, 8, 63); break; /* Se (not used) */
case CODEC_ID_LJPEG: put_bits(&s->pb, 8, 0); break; /* not used */
- default: assert(0);
+ default: av_assert0(0);
}
put_bits(&s->pb, 8, 0); /* Ah/Al (not used) */
@@ -305,7 +302,7 @@ static void escape_FF(MpegEncContext *s, int start)
uint8_t *buf= s->pb.buf + start;
int align= (-(size_t)(buf))&3;
- assert((size&7) == 0);
+ av_assert1((size&7) == 0);
size >>= 3;
ff_count=0;
@@ -373,7 +370,7 @@ void ff_mjpeg_encode_stuffing(MpegEncContext *s)
void ff_mjpeg_encode_picture_trailer(MpegEncContext *s)
{
- assert((s->header_bits&7)==0);
+ av_assert1((s->header_bits&7)==0);
put_marker(&s->pb, EOI);