Commit c7d155f6 authored by Gildas Bazin's avatar Gildas Bazin

* modules/codec/ffmpeg/encoder.c: fixed aspect ratio.

parent 31ab209a
......@@ -326,10 +326,11 @@ int E_(OpenEncoder)( vlc_object_t *p_this )
p_context->b_frame_strategy = 0;
#if LIBAVCODEC_BUILD >= 4687
p_context->sample_aspect_ratio =
(AVRational){ p_enc->fmt_in.video.i_aspect *
av_reduce( &p_context->sample_aspect_ratio.num,
&p_context->sample_aspect_ratio.den,
p_enc->fmt_in.video.i_aspect *
(int64_t)p_context->height / p_context->width,
VOUT_ASPECT_FACTOR };
VOUT_ASPECT_FACTOR, INT_MAX );
#else
p_context->aspect_ratio = ((float)p_enc->fmt_in.video.i_aspect) /
VOUT_ASPECT_FACTOR;
......
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