[Mplayer-cvslog] CVS: main/libmpdemux demux_y4m.c,1.3,1.4
Alex Beregszaszi
alex at mplayer.dev.hu
Thu Dec 27 20:54:39 CET 2001
- Previous message: [Mplayer-cvslog] CVS: main/DOCS cd-dvd.html,1.18,1.19 mplayer.1,1.120,1.121
- Next message: [Mplayer-cvslog] CVS: main/libmpdemux demux_nuv.c,NONE,1.1 Makefile,1.14,1.15 demuxer.h,1.24,1.25 demuxer.c,1.60,1.61
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv29926
Modified Files:
demux_y4m.c
Log Message:
aspect ratio patch by Rik Snel
Index: demux_y4m.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_y4m.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- demux_y4m.c 27 Dec 2001 11:39:47 -0000 1.3
+++ demux_y4m.c 27 Dec 2001 19:54:36 -0000 1.4
@@ -116,7 +116,7 @@
void demux_open_y4m(demuxer_t* demuxer){
y4m_priv_t* priv = demuxer->priv;
- y4m_ratio_t framerate;
+ y4m_ratio_t ratio;
sh_video_t* sh=new_sh_video(demuxer,0);
int err;
@@ -186,13 +186,17 @@
mp_msg(MSGT_DEMUXER, MSGL_FATAL, "error parsing YUV4MPEG header: %s\n", y4m_strerr(err));
if(!sh->fps) {
- framerate = y4m_si_get_framerate(priv->si);
- if (framerate.d != 0)
- sh->fps=(float)framerate.n/(float)framerate.d;
+ ratio = y4m_si_get_framerate(priv->si);
+ if (ratio.d != 0)
+ sh->fps=(float)ratio.n/(float)ratio.d;
else
sh->fps=15.0f;
}
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);
@@ -224,7 +228,7 @@
void demux_close_y4m(demuxer_t *demuxer)
{
- y4m_priv_t* priv;
+ y4m_priv_t* priv = demuxer->priv;
if (!priv->is_older)
y4m_fini_stream_info(((y4m_priv_t*)demuxer->priv)->si);
- Previous message: [Mplayer-cvslog] CVS: main/DOCS cd-dvd.html,1.18,1.19 mplayer.1,1.120,1.121
- Next message: [Mplayer-cvslog] CVS: main/libmpdemux demux_nuv.c,NONE,1.1 Makefile,1.14,1.15 demuxer.h,1.24,1.25 demuxer.c,1.60,1.61
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list