vd_lavc: fix crash with RPI hwdec

If you use vo_rpi, this could crash, because hwdec_devs is NULL.

Untested. Fixes #5301.
This commit is contained in:
wm4 2017-12-28 04:07:28 +01:00 committed by Kevin Mitchell
parent 0030e049cd
commit 5cbadbe721
1 changed files with 2 additions and 1 deletions

View File

@ -453,7 +453,8 @@ static void select_and_set_hwdec(struct dec_video *vd)
} else if (!hwdec->copying) {
// Most likely METHOD_INTERNAL, which often use delay-loaded
// VO support as well.
hwdec_devices_request_all(vd->hwdec_devs);
if (vd->hwdec_devs)
hwdec_devices_request_all(vd->hwdec_devs);
}
ctx->use_hwdec = true;