# HG changeset patch # User gpoirier # Date 1173259176 0 # Node ID f3220a5807b57c27ba9f165a861b4c973b30cd2c # Parent e979a71e0bcd1d9fa79c7ca70a8c09f547e6f476 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 diff -r e979a71e0bcd -r f3220a5807b5 libmpcodecs/vd_ffmpeg.c --- a/libmpcodecs/vd_ffmpeg.c Wed Mar 07 01:31:29 2007 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Wed Mar 07 09:19:36 2007 +0000 @@ -504,8 +504,11 @@ !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;