diff options
author | Rodeo <[email protected]> | 2013-08-25 19:52:28 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2013-08-25 19:52:28 +0000 |
commit | 500769514ab543f122e59b0288af5c4ecfa95053 (patch) | |
tree | 2e1ec7d71b8afb426312f1ad720a794c164c2616 /libhb/muxavformat.c | |
parent | 3e700c6e8f0054679d56b7bc5869a48f892a2291 (diff) |
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
Diffstat (limited to 'libhb/muxavformat.c')
-rw-r--r-- | libhb/muxavformat.c | 18 |
1 files changed, 14 insertions, 4 deletions
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; |