Commit 58a770fe authored by Fiona Glaser's avatar Fiona Glaser

Stop SAR in y4m input from overriding --sar on commandline

parent a8cb7662
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment