mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02:00
player: fix crash if no video decoder can be initialized
Caused by the recent refactoring for complex filters.
This commit is contained in:
parent
b7f6dfc19a
commit
7caecc53b0
@ -395,6 +395,7 @@ int reinit_video_chain_src(struct MPContext *mpctx, struct lavfi_pad *src)
|
|||||||
mpctx->vo_chain = vo_c;
|
mpctx->vo_chain = vo_c;
|
||||||
vo_c->log = mpctx->log;
|
vo_c->log = mpctx->log;
|
||||||
vo_c->vo = mpctx->video_out;
|
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);
|
vo_control(vo_c->vo, VOCTRL_GET_HWDEC_INFO, &vo_c->hwdec_info);
|
||||||
|
|
||||||
|
@ -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)
|
void video_uninit(struct dec_video *d_video)
|
||||||
{
|
{
|
||||||
|
if (!d_video)
|
||||||
|
return;
|
||||||
mp_image_unrefp(&d_video->current_mpi);
|
mp_image_unrefp(&d_video->current_mpi);
|
||||||
mp_image_unrefp(&d_video->cover_art_mpi);
|
mp_image_unrefp(&d_video->cover_art_mpi);
|
||||||
if (d_video->vd_driver) {
|
if (d_video->vd_driver) {
|
||||||
|
Loading…
Reference in New Issue
Block a user