From 102a4a8b0654396de7a6355adcf2292a277b6595 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 28 Sep 2020 00:04:21 +0200 Subject: player: let frontend decide whether to use cover-art mode Essentially, this lets video.c decide whether to consider a video track cover art, instead of having the decoder wrapper use the lower level sh_stream flag. Some pain because of the dumb threading shit. Moving the code further down to make some of it part of the lock should not change behavior, although it could (framedrop nonsense). This commit should not change actual behavior, and is only preparation for the following commit. --- player/video.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'player') diff --git a/player/video.c b/player/video.c index 2b8f03630e..c13bdb4074 100644 --- a/player/video.c +++ b/player/video.c @@ -261,9 +261,12 @@ void reinit_video_chain_src(struct MPContext *mpctx, struct track *track) vo_c->dec_src = track->dec->f->pins[0]; vo_c->filter->container_fps = mp_decoder_wrapper_get_container_fps(track->dec); - vo_c->is_coverart = !!track->stream->attached_picture; + vo_c->is_coverart = !!track->attached_picture; vo_c->is_sparse = track->stream->still_image || vo_c->is_coverart; + if (vo_c->is_coverart) + mp_decoder_wrapper_set_coverart_flag(track->dec, true); + track->vo_c = vo_c; vo_c->track = track; -- cgit v1.2.3