diff options
author | rik <rik@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-06-03 09:52:25 +0000 |
---|---|---|
committer | rik <rik@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-06-03 09:52:25 +0000 |
commit | 5328d48fbe730c4699f1dd71549783af1baad627 (patch) | |
tree | 4e014a1b1dd5ba7896bb60e56d88b020c901918e /libmpdemux | |
parent | 52b6379a74f272b635f8fee9627703f6eb8d63b6 (diff) |
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
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_y4m.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |