From: Jason Garrett-Glaser Date: Wed, 7 Oct 2009 05:15:10 +0000 (-0700) Subject: Fix bug where x264 generated non-compliant bitstreams with insane SAR values X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=fc4926a2d9a4e355ea6a24c962731f5f8c6bd83a;p=x264.git Fix bug where x264 generated non-compliant bitstreams with insane SAR values --- diff --git a/encoder/encoder.c b/encoder/encoder.c index dd38ea70..c49ed229 100644 --- a/encoder/encoder.c +++ b/encoder/encoder.c @@ -724,6 +724,8 @@ static void x264_set_aspect_ratio( x264_t *h, x264_param_t *param, int initial ) i_h /= 2; } + x264_reduce_fraction( &i_w, &i_h ); + if( i_w != old_w || i_h != old_h || initial ) { h->param.vui.i_sar_width = 0;