Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
mp4 muxer: fix the aspect ratio?
  • Loading branch information
perexg committed Jan 9, 2016
1 parent 1a84899 commit 36de73a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/muxer/muxer_libav.c
Expand Up @@ -159,6 +159,12 @@ lav_muxer_add_stream(lav_muxer_t *lm,
c->sample_aspect_ratio.num = ssc->ssc_aspect_num;
c->sample_aspect_ratio.den = ssc->ssc_aspect_den;

if (lm->m_config.m_type == MC_AVMP4) {
/* this is a whole hell */
AVRational ratio = { c->height, c->width };
c->sample_aspect_ratio = av_mul_q(c->sample_aspect_ratio, ratio);
}

st->sample_aspect_ratio.num = c->sample_aspect_ratio.num;
st->sample_aspect_ratio.den = c->sample_aspect_ratio.den;

Expand Down

0 comments on commit 36de73a

Please sign in to comment.