diff options
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 1 | ||||
-rw-r--r-- | player/command.h | 1 | ||||
-rw-r--r-- | player/loadfile.c | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c index 974c61769e..6288106bee 100644 --- a/player/command.c +++ b/player/command.c @@ -4117,6 +4117,7 @@ static const char *const *const mp_event_property_change[] = { "estimated-display-fps", "vsync-jitter", "sub-text", "audio-bitrate", "video-bitrate", "sub-bitrate", "decoder-frame-drop-count", "frame-drop-count", "video-frame-info"), + E(MP_EVENT_DURATION_UPDATE, "duration"), E(MPV_EVENT_VIDEO_RECONFIG, "video-out-params", "video-params", "video-format", "video-codec", "video-bitrate", "dwidth", "dheight", "width", "height", "fps", "aspect", "vo-configured", "current-vo", diff --git a/player/command.h b/player/command.h index 0ab746b1d2..478bc8c737 100644 --- a/player/command.h +++ b/player/command.h @@ -57,6 +57,7 @@ enum { MP_EVENT_WIN_STATE, MP_EVENT_CHANGE_PLAYLIST, MP_EVENT_CORE_IDLE, + MP_EVENT_DURATION_UPDATE, }; bool mp_hook_test_completion(struct MPContext *mpctx, char *type); diff --git a/player/loadfile.c b/player/loadfile.c index 8139c06f3f..d2e26c1ba4 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -212,6 +212,8 @@ void update_demuxer_properties(struct MPContext *mpctx) mpctx->filtered_tags = info; mp_notify(mpctx, MPV_EVENT_METADATA_UPDATE, NULL); } + if (events & DEMUX_EVENT_DURATION) + mp_notify(mpctx, MP_EVENT_DURATION_UPDATE, NULL); demuxer->events = 0; } |