changeset 22466:f3220a5807b5

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
author gpoirier
date Wed, 07 Mar 2007 09:19:36 +0000
parents e979a71e0bcd
children 7336cfb3b88f
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;