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).
This commit is contained in:
wm4 2015-02-05 21:54:08 +01:00
parent e2f4554fd9
commit e68f4be17a
1 changed files with 5 additions and 17 deletions

View File

@ -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;