mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
f5eed454d4
commit
0619272767
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue