From 5328d48fbe730c4699f1dd71549783af1baad627 Mon Sep 17 00:00:00 2001 From: rik Date: Thu, 3 Jun 2004 09:52:25 +0000 Subject: fix bug reported by Leonardo Giordani: sh->aspect is not pixel aspect but movie aspect git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12530 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_y4m.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libmpdemux') diff --git a/libmpdemux/demux_y4m.c b/libmpdemux/demux_y4m.c index 833ccaa735..8b0b41b5af 100644 --- a/libmpdemux/demux_y4m.c +++ b/libmpdemux/demux_y4m.c @@ -195,11 +195,13 @@ void demux_open_y4m(demuxer_t* demuxer){ sh->frametime=1.0f/sh->fps; ratio = y4m_si_get_sampleaspect(priv->si); - if (ratio.d != 0 && ratio.n != 0) - sh->aspect = (float)ratio.n/(float)ratio.d; sh->disp_w = y4m_si_get_width(priv->si); sh->disp_h = y4m_si_get_height(priv->si); + + if (ratio.d != 0 && ratio.n != 0) + sh->aspect = (float)(sh->disp_w*ratio.n)/(float)(sh->disp_h*ratio.d); + demuxer->seekable = 0; } -- cgit v1.2.3