Fix ratio aspect on Matroska files, broken with recent 'spect change in DVB' patch

patch by Carl Eugen Hoyos % cehoyos A ag P or P at %
Original thread:
Subj: [MPlayer-dev-eng] [PATCH] Fix aspect in mkv
Date: 03/05/2007 02:01 PM
Bug report report:
http://lists.mplayerhq.hu/pipermail/mplayer-users/2007-March/065823.html


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22484 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
gpoirier 2007-03-07 09:19:36 +00:00
parent 196bee14d3
commit 306f6243fd
1 changed files with 4 additions and 1 deletions

View File

@ -504,8 +504,11 @@ static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt){
!ctx->vo_inited)
{
mp_msg(MSGT_DECVIDEO, MSGL_V, "[ffmpeg] aspect_ratio: %f\n", aspect);
if (sh->aspect == 0 ||
av_cmp_q(avctx->sample_aspect_ratio,
ctx->last_sample_aspect_ratio))
sh->aspect = aspect;
ctx->last_sample_aspect_ratio = avctx->sample_aspect_ratio;
sh->aspect = aspect;
sh->disp_w = width;
sh->disp_h = height;
ctx->pix_fmt = pix_fmt;