summaryrefslogtreecommitdiffstats
path: root/player/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/misc.c')
-rw-r--r--player/misc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/player/misc.c b/player/misc.c
index 80d6e5453a..6f3f98cd49 100644
--- a/player/misc.c
+++ b/player/misc.c
@@ -169,6 +169,20 @@ void issue_refresh_seek(struct MPContext *mpctx, enum seek_precision min_prec)
queue_seek(mpctx, MPSEEK_ABSOLUTE, get_current_time(mpctx), min_prec, 0);
}
+void update_content_type(struct MPContext *mpctx, struct track *track)
+{
+ enum mp_content_type content_type;
+ if (!track || !track->vo_c) {
+ content_type = MP_CONTENT_NONE;
+ } else if (track->image) {
+ content_type = MP_CONTENT_IMAGE;
+ } else {
+ content_type = MP_CONTENT_VIDEO;
+ }
+ if (mpctx->video_out)
+ vo_control(mpctx->video_out, VOCTRL_CONTENT_TYPE, (void *)content_type);
+}
+
void update_vo_playback_state(struct MPContext *mpctx)
{
if (mpctx->video_out && mpctx->video_out->config_ok) {