mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 20:03:10 +02:00
vo: correctly initialize parameters in corner cases
This commit is contained in:
parent
2bc871b577
commit
ae09c0d8eb
@ -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,
|
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)
|
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;
|
return;
|
||||||
|
}
|
||||||
mp_get_src_dst_rects(vo->log, vo->opts, vo->driver->caps, vo->params,
|
mp_get_src_dst_rects(vo->log, vo->opts, vo->driver->caps, vo->params,
|
||||||
vo->dwidth, vo->dheight, vo->monitor_par,
|
vo->dwidth, vo->dheight, vo->monitor_par,
|
||||||
out_src, out_dst, out_osd);
|
out_src, out_dst, out_osd);
|
||||||
|
Loading…
Reference in New Issue
Block a user