summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-09-28 00:04:21 +0200
committerwm4 <wm4@nowhere>2020-09-28 00:04:21 +0200
commit102a4a8b0654396de7a6355adcf2292a277b6595 (patch)
treebfa1af22f84043bb63e8b79e193b7038db5e5988 /player
parent5e4ec15e6cf378e8d0c6aa81968351d35499fb4a (diff)
downloadmpv-102a4a8b0654396de7a6355adcf2292a277b6595.tar.bz2
mpv-102a4a8b0654396de7a6355adcf2292a277b6595.tar.xz
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.
Diffstat (limited to 'player')
-rw-r--r--player/video.c5
1 files changed, 4 insertions, 1 deletions
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;