diff options
author | wm4 <wm4@nowhere> | 2015-02-05 21:54:08 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-02-05 21:54:08 +0100 |
commit | e68f4be17a8bb8effe4c05c9c14ef43e5a00aefe (patch) | |
tree | 6c0561b0f69abf7f5bff6b5512c4817a9924001e /demux | |
parent | e2f4554fd96b8e340048ec7c09c4b0592ca5e611 (diff) |
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).
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_mkv.c | 22 |
1 files 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; |