summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-01 17:24:19 +0200
committerwm4 <wm4@nowhere>2014-06-01 17:24:19 +0200
commitae09c0d8ebdf77beed10b35155bde776fe4b6866 (patch)
treef136ac5a33e7537616306b0f93753fb9b4c7a129 /video
parent2bc871b577c13cc74568898fecda9d87efe1ac19 (diff)
downloadmpv-ae09c0d8ebdf77beed10b35155bde776fe4b6866.tar.bz2
mpv-ae09c0d8ebdf77beed10b35155bde776fe4b6866.tar.xz
vo: correctly initialize parameters in corner cases
Diffstat (limited to 'video')
-rw-r--r--video/out/vo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index c02b9d9c24..4595fa0d8a 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -391,8 +391,11 @@ void vo_seek_reset(struct vo *vo)
void vo_get_src_dst_rects(struct vo *vo, struct mp_rect *out_src,
struct mp_rect *out_dst, struct mp_osd_res *out_osd)
{
- if (!vo->params)
+ if (!vo->params) {
+ *out_src = *out_dst = (struct mp_rect){0};
+ *out_osd = (struct mp_osd_res){0};
return;
+ }
mp_get_src_dst_rects(vo->log, vo->opts, vo->driver->caps, vo->params,
vo->dwidth, vo->dheight, vo->monitor_par,
out_src, out_dst, out_osd);