]> granicus.if.org Git - libx264/commitdiff
Fix bug where x264 generated non-compliant bitstreams with insane SAR values
authorFiona Glaser <fiona@x264.com>
Wed, 7 Oct 2009 05:15:10 +0000 (22:15 -0700)
committerFiona Glaser <fiona@x264.com>
Mon, 12 Oct 2009 08:41:34 +0000 (01:41 -0700)
encoder/encoder.c

index 549887dbc9dd15515ce5a4f9e6e7d702cc586d4c..474430338c7ac994968e1e66607a6df4570623ab 100644 (file)
@@ -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;