[FFmpeg-devel] [PATCH] Make a condition that should always be true an assert.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Apr 28 22:29:18 CEST 2012


amv_encode_picture exists with error if CODEC_FLAG_EMU_EDGE
is set.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
 libavcodec/mpegvideo_enc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 15fa9a2..6d89cfe 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1012,7 +1012,8 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg)
                 uint8_t *src = pic_arg->data[i];
                 uint8_t *dst = pic->data[i];
 
-                if(s->codec_id == CODEC_ID_AMV && !(s->avctx->flags & CODEC_FLAG_EMU_EDGE)){
+                if(s->codec_id == CODEC_ID_AMV){
+                    av_assert0(!(s->avctx->flags & CODEC_FLAG_EMU_EDGE));
                     h= ((s->height+15)/16*16)>>v_shift;
                 }
 
-- 
1.7.10



More information about the ffmpeg-devel mailing list