From: Fiona 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: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b81316490e58524d3f86f2439cc8cfa2355eac3;p=libx264 Fix bug where x264 generated non-compliant bitstreams with insane SAR values --- diff --git a/encoder/encoder.c b/encoder/encoder.c index 549887db..47443033 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;