diff options
author | wm4 <wm4@nowhere> | 2017-12-28 04:07:28 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2017-12-28 00:17:42 -0700 |
commit | 5cbadbe72145d85e738e6bd6d47c6a052fd25a62 (patch) | |
tree | 224f22ca122e814c8b38e25f2ff494544067808d /video/decode/vd_lavc.c | |
parent | 0030e049cd1707762f6f8cd76c7414b95baf928f (diff) | |
download | mpv-5cbadbe72145d85e738e6bd6d47c6a052fd25a62.tar.bz2 mpv-5cbadbe72145d85e738e6bd6d47c6a052fd25a62.tar.xz |
vd_lavc: fix crash with RPI hwdec
If you use vo_rpi, this could crash, because hwdec_devs is NULL.
Untested. Fixes #5301.
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r-- | video/decode/vd_lavc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index a6dd50597a..29bf3ec56f 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -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; |