From f1edd8ef90fb730effe62c6227586d8c121c9499 Mon Sep 17 00:00:00 2001 From: Harald Karnet Date: Fri, 25 May 2007 14:42:11 +0000 Subject: [PATCH] Correct the parameter order for the call to "av_clip". Patch by Harald Karnet, harald karner % gmx net. Thread [FFmpeg-devel] [PATCH] Bugfix H.263+ encoder frame header corruption Originally committed as revision 9131 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/h263.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h263.c b/libavcodec/h263.c index ebf64fd..0719d7e 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -212,7 +212,7 @@ void h263_encode_picture_header(MpegEncContext * s, int picture_number) for(i=0; i<2; i++){ int div, error; div= (s->avctx->time_base.num*1800000LL + 500LL*s->avctx->time_base.den) / ((1000LL+i)*s->avctx->time_base.den); - div= av_clip(1, div, 127); + div= av_clip(div, 1, 127); error= FFABS(s->avctx->time_base.num*1800000LL - (1000LL+i)*s->avctx->time_base.den*div); if(error < best_error){ best_error= error; -- 2.7.4