From cbdaeb04ec128db18fcdb7480d81785fa7f4f371 Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Mon, 15 Sep 2008 10:53:29 -0700 Subject: [PATCH] Stop SAR in y4m input from overriding --sar on commandline --- muxers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/muxers.c b/muxers.c index 497878a0..51f82bb1 100644 --- a/muxers.c +++ b/muxers.c @@ -216,7 +216,8 @@ int open_file_y4m( char *psz_filename, hnd_t *p_handle, x264_param_t *p_param ) tokstart = strchr(tokstart, 0x20); break; case 'A': /* Pixel aspect - 0:0 if unknown */ - if( sscanf(tokstart, "%d:%d", &n, &d) == 2 && n && d ) + /* Don't override the aspect ratio if sar has been explicitly set on the commandline. */ + if( sscanf(tokstart, "%d:%d", &n, &d) == 2 && n && d && !p_param->vui.i_sar_width && !p_param->vui.i_sar_height ) { x264_reduce_fraction( &n, &d ); p_param->vui.i_sar_width = n; -- 2.47.3