diff options
author | wm4 <wm4@nowhere> | 2013-11-22 18:03:39 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-22 18:06:14 +0100 |
commit | 061927276751a3c7bc0b9c941e61d29b3ba29d7c (patch) | |
tree | bd582a07548d6a2b33ecc1d8738cc8cc487c8735 /video | |
parent | f5eed454d402b860489909fca995f7c1f7008373 (diff) | |
download | mpv-061927276751a3c7bc0b9c941e61d29b3ba29d7c.tar.bz2 mpv-061927276751a3c7bc0b9c941e61d29b3ba29d7c.tar.xz |
vo_opengl: initialize all fields for VFCTRL_GET_HWDEC_INFO
This initialized only the load_api and load_api_ctx fields, and left the
other fields as they were. This failed with vf_vavpp, which assumed all
fields are initialized.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo_opengl.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index 8572f587a4..10cf9c8c1d 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -239,10 +239,14 @@ static void request_hwdec_api(struct mp_hwdec_info *info, const char *api_name) static void get_hwdec_info(struct gl_priv *p, struct mp_hwdec_info *info) { - info->load_api = request_hwdec_api; - info->load_api_ctx = p; - if (p->hwdec) - *info = *p->hwdec->info; + if (p->hwdec) { + *info = p->hwdec->info; + } else { + *info = (struct mp_hwdec_info) { + .load_api = request_hwdec_api, + .load_api_ctx = p, + } + } } static void unload_hwdec_driver(struct gl_priv *p) |