[Mplayer-cvslog] CVS: main/libmpdemux demux_mkv.cpp,1.50,1.51
Moritz Bunkus CVS
mosu at mplayerhq.hu
Mon Dec 15 12:17:05 CET 2003
Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv4770
Modified Files:
demux_mkv.cpp
Log Message:
For RealVideo the aspect ratio was overridden in vd_realvid.c. Implemented a workaround.
Index: demux_mkv.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mkv.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- demux_mkv.cpp 5 Dec 2003 11:03:43 -0000 1.50
+++ demux_mkv.cpp 15 Dec 2003 11:16:41 -0000 1.51
@@ -2178,9 +2178,19 @@
track->v_frate = 25.0;
sh_v->fps = track->v_frate;
sh_v->frametime = 1 / track->v_frate;
- sh_v->disp_w = track->v_width;
- sh_v->disp_h = track->v_height;
- sh_v->aspect = (float)track->v_dwidth / (float)track->v_dheight;
+ if (!track->realmedia) {
+ sh_v->disp_w = track->v_width;
+ sh_v->disp_h = track->v_height;
+ sh_v->aspect = (float)track->v_dwidth / (float)track->v_dheight;
+ } else {
+ // vd_realvid.c will set aspect to disp_w/disp_h and rederive
+ // disp_w and disp_h from the RealVideo stream contents returned
+ // by the Real DLLs. If DisplayWidth/DisplayHeight was not set in
+ // the Matroska file then it has already been set to PixelWidth/Height
+ // by check_track_information.
+ sh_v->disp_w = track->v_dwidth;
+ sh_v->disp_h = track->v_dheight;
+ }
if (idesc != NULL)
sh_v->ImageDesc = idesc;
mp_msg(MSGT_DEMUX, MSGL_V, "[mkv] Aspect: %f\n", sh_v->aspect);
More information about the MPlayer-cvslog
mailing list