mirror of
https://github.com/mpv-player/mpv
synced 2024-09-05 02:48:21 +02:00
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
This commit is contained in:
parent
52b6379a74
commit
5328d48fbe
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user