diff options
author | wm4 <wm4@nowhere> | 2016-02-10 00:07:01 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-02-10 00:07:01 +0100 |
commit | 7caecc53b0b8ac1805fa498fb9dbe9379f3053d4 (patch) | |
tree | d63c2b6e4902016c8d69e7657ff4cb7e28286020 | |
parent | b7f6dfc19ad1a051a8365c055c2a9629cb2341b4 (diff) | |
download | mpv-7caecc53b0b8ac1805fa498fb9dbe9379f3053d4.tar.bz2 mpv-7caecc53b0b8ac1805fa498fb9dbe9379f3053d4.tar.xz |
player: fix crash if no video decoder can be initialized
Caused by the recent refactoring for complex filters.
-rw-r--r-- | player/video.c | 1 | ||||
-rw-r--r-- | video/decode/dec_video.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/player/video.c b/player/video.c index 9768a53b85..12a566cd12 100644 --- a/player/video.c +++ b/player/video.c @@ -395,6 +395,7 @@ int reinit_video_chain_src(struct MPContext *mpctx, struct lavfi_pad *src) mpctx->vo_chain = vo_c; vo_c->log = mpctx->log; vo_c->vo = mpctx->video_out; + vo_c->vf = vf_new(mpctx->global); vo_control(vo_c->vo, VOCTRL_GET_HWDEC_INFO, &vo_c->hwdec_info); diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c index ed0bfb825e..d20d10304e 100644 --- a/video/decode/dec_video.c +++ b/video/decode/dec_video.c @@ -81,6 +81,8 @@ int video_vd_control(struct dec_video *d_video, int cmd, void *arg) void video_uninit(struct dec_video *d_video) { + if (!d_video) + return; mp_image_unrefp(&d_video->current_mpi); mp_image_unrefp(&d_video->cover_art_mpi); if (d_video->vd_driver) { |