From fc4926a2d9a4e355ea6a24c962731f5f8c6bd83a Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Tue, 6 Oct 2009 22:15:10 -0700 Subject: [PATCH] Fix bug where x264 generated non-compliant bitstreams with insane SAR values --- encoder/encoder.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.47.3