[x264-devel] commit: Stop SAR in y4m input from overriding --sar on commandline ( Jason Garrett-Glaser )
git version control
git at videolan.org
Mon Sep 15 21:21:31 CEST 2008
x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Mon Sep 15 10:53:29 2008 -0700| [cbdaeb04ec128db18fcdb7480d81785fa7f4f371] | committer: Jason Garrett-Glaser
Stop SAR in y4m input from overriding --sar on commandline
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=cbdaeb04ec128db18fcdb7480d81785fa7f4f371
---
muxers.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/muxers.c b/muxers.c
index 497878a..51f82bb 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;
More information about the x264-devel
mailing list