From e68f4be17a8bb8effe4c05c9c14ef43e5a00aefe Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 5 Feb 2015 21:54:08 +0100 Subject: demux_mkv: remove realvideo-specific aspect ratio handling I suppose it could lead to subtle changes in behavior in presence of realvideo files that change aspect radio. With the only sample I had available, the behavior actually improved (azumi.mkv from the MPlayer samples FTP; when starting playback in the middle it used the wrong aspect ratio). --- demux/demux_mkv.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index 6bb8fd0c2a..a39accda7b 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -1300,23 +1300,11 @@ static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track) if (track->v_frate == 0.0) track->v_frate = 25.0; sh_v->fps = track->v_frate; - sh_v->aspect = 0; - if (!track->realmedia) { - sh_v->disp_w = track->v_width; - sh_v->disp_h = track->v_height; - uint32_t dw = track->v_dwidth_set ? track->v_dwidth : track->v_width; - uint32_t dh = track->v_dheight_set ? track->v_dheight : track->v_height; - if (dw && dh) - sh_v->aspect = (double) dw / dh; - } 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; - } + sh_v->disp_w = track->v_width; + sh_v->disp_h = track->v_height; + uint32_t dw = track->v_dwidth_set ? track->v_dwidth : track->v_width; + uint32_t dh = track->v_dheight_set ? track->v_dheight : track->v_height; + sh_v->aspect = (dw && dh) ? (double) dw / dh : 0; MP_VERBOSE(demuxer, "Aspect: %f\n", sh_v->aspect); sh_v->avi_dts = track->ms_compat; sh_v->stereo_mode = track->stereo_mode; -- cgit v1.2.3