From 306f6243fdf6007e6e1bbef413de0128a22e47b8 Mon Sep 17 00:00:00 2001 From: gpoirier Date: Wed, 7 Mar 2007 09:19:36 +0000 Subject: 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 --- libmpcodecs/vd_ffmpeg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libmpcodecs') diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index c1c1c085d7..047463fee4 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -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; -- cgit v1.2.3