summaryrefslogtreecommitdiffstats
path: root/mpvcore
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-26 17:30:01 +0200
committerwm4 <wm4@nowhere>2013-09-26 17:33:57 +0200
commit5a837ced0ba37b4399ecdf9500637a628b599f0d (patch)
treebc1cece3d74b0de685e58895a94819af7fe5b245 /mpvcore
parent9a55c4e70cebe6da6b7c7796119f84c4c9ad2a60 (diff)
downloadmpv-5a837ced0ba37b4399ecdf9500637a628b599f0d.tar.bz2
mpv-5a837ced0ba37b4399ecdf9500637a628b599f0d.tar.xz
video: let sh_video->disp_w/h always be container size
Nothing really accesses it. Subtitle initialization actually does in a somewhat meaningful way, but there container size is probably fine, as subtitles were always initialized before the first video frame was decoded.
Diffstat (limited to 'mpvcore')
-rw-r--r--mpvcore/command.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mpvcore/command.c b/mpvcore/command.c
index bce0300bc5..70a14630a3 100644
--- a/mpvcore/command.c
+++ b/mpvcore/command.c
@@ -1429,18 +1429,22 @@ static int mp_property_video_bitrate(m_option_t *prop, int action,
static int mp_property_width(m_option_t *prop, int action, void *arg,
MPContext *mpctx)
{
- if (!mpctx->sh_video)
+ struct sh_video *sh = mpctx->sh_video;
+ if (!sh)
return M_PROPERTY_UNAVAILABLE;
- return m_property_int_ro(prop, action, arg, mpctx->sh_video->disp_w);
+ return m_property_int_ro(prop, action, arg,
+ sh->vf_input ? sh->vf_input->w : sh->disp_w);
}
/// Video display height (RO)
static int mp_property_height(m_option_t *prop, int action, void *arg,
MPContext *mpctx)
{
- if (!mpctx->sh_video)
+ struct sh_video *sh = mpctx->sh_video;
+ if (!sh)
return M_PROPERTY_UNAVAILABLE;
- return m_property_int_ro(prop, action, arg, mpctx->sh_video->disp_h);
+ return m_property_int_ro(prop, action, arg,
+ sh->vf_input ? sh->vf_input->h : sh->disp_h);
}
static int property_vo_wh(m_option_t *prop, int action, void *arg,