From 500769514ab543f122e59b0288af5c4ecfa95053 Mon Sep 17 00:00:00 2001 From: Rodeo Date: Sun, 25 Aug 2013 19:52:28 +0000 Subject: Fix display size when anamorphic is disabled. Some interfaces set the PAR width/height to be the same as the input's, even when anamorphic is disabled. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5750 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/muxavformat.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'libhb/muxavformat.c') diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c index ff53ebbe9..31b9aa46a 100644 --- a/libhb/muxavformat.c +++ b/libhb/muxavformat.c @@ -314,12 +314,22 @@ static int avformatInit( hb_mux_object_t * m ) track->st->codec->extradata = priv_data; track->st->codec->extradata_size = priv_size; + if (job->anamorphic.mode > 0) + { + track->st->sample_aspect_ratio.num = job->anamorphic.par_width; + track->st->sample_aspect_ratio.den = job->anamorphic.par_height; + track->st->codec->sample_aspect_ratio.num = job->anamorphic.par_width; + track->st->codec->sample_aspect_ratio.den = job->anamorphic.par_height; + } + else + { + track->st->sample_aspect_ratio.num = 1; + track->st->sample_aspect_ratio.den = 1; + track->st->codec->sample_aspect_ratio.num = 1; + track->st->codec->sample_aspect_ratio.den = 1; + } track->st->codec->width = job->width; track->st->codec->height = job->height; - track->st->sample_aspect_ratio.num = job->anamorphic.par_width; - track->st->sample_aspect_ratio.den = job->anamorphic.par_height; - track->st->codec->sample_aspect_ratio.num = job->anamorphic.par_width; - track->st->codec->sample_aspect_ratio.den = job->anamorphic.par_height; track->st->disposition |= AV_DISPOSITION_DEFAULT; int vrate_base, vrate; -- cgit v1.2.3