From aab595f828c9e158cd08cadc48ccc6fe9725e464 Mon Sep 17 00:00:00 2001 From: Dan Oscarsson Date: Wed, 28 Nov 2018 17:40:02 +0100 Subject: command: notify on multiply doing multiply on a property is also a set property command and the change should be notified so others can observe the change --- player/command.c | 1 + 1 file changed, 1 insertion(+) (limited to 'player') diff --git a/player/command.c b/player/command.c index 7237b08820..add4383ddc 100644 --- a/player/command.c +++ b/player/command.c @@ -4151,6 +4151,7 @@ static bool is_property_set(int action, void *val) case M_PROPERTY_SWITCH: case M_PROPERTY_SET_STRING: case M_PROPERTY_SET_NODE: + case M_PROPERTY_MULTIPLY: return true; case M_PROPERTY_KEY_ACTION: { struct m_property_action_arg *key = val; -- cgit v1.2.3 From 9be68e49b26036972860dc10df2363e6e8f0d586 Mon Sep 17 00:00:00 2001 From: Olivier Perret Date: Sun, 6 Jan 2019 15:01:43 +0100 Subject: lua: execute idle handlers after timers have been processed Idle handlers used to not be executed when timers were active Now they are executed: * After all expired timers have been executed * After all events have been processed (same as when there are no timers) --- player/lua/defaults.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'player') diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua index d5bb194c50..8f91899bc2 100644 --- a/player/lua/defaults.lua +++ b/player/lua/defaults.lua @@ -476,12 +476,9 @@ function mp.dispatch_events(allow_wait) while mp.keep_running do local wait = 0 if not more_events then - wait = process_timers() - if wait == nil then - for _, handler in ipairs(idle_handlers) do - handler() - end - wait = 1e20 -- infinity for all practical purposes + wait = process_timers() or 1e20 -- infinity for all practical purposes + for _, handler in ipairs(idle_handlers) do + handler() end -- Resume playloop - important especially if an error happened while -- suspended, and the error was handled, but no resume was done. -- cgit v1.2.3 From 73fe0611b32bbdbbd687046d5f3785da3ddefb27 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 13 Jan 2019 13:34:15 +0100 Subject: stats: merge multiple properties into one line Merge file-size/file-format and audio channel-count/format into one line respectively. This fixes stats overflowing the screen in larger than 19:6 aspect ratios. In this case a problem was reported for ~21:9 which should be common enough for us to "support" it. --- player/lua/stats.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'player') diff --git a/player/lua/stats.lua b/player/lua/stats.lua index 95a036d5c4..504e54636e 100644 --- a/player/lua/stats.lua +++ b/player/lua/stats.lua @@ -430,7 +430,8 @@ local function add_file(s) append_property(s, "media-title", {prefix="Title:"}) end - append_property(s, "file-format", {prefix="Format/Protocol:"}) + local fs = append_property(s, "file-size", {prefix="Size:"}) + append_property(s, "file-format", {prefix="Format/Protocol:", nl=fs and "" or o.nl}) local ch_index = mp.get_property_number("chapter") if ch_index and ch_index >= 0 then @@ -460,7 +461,6 @@ local function add_file(s) indent=o.prefix_sep, no_prefix_markup=true}) end end - append_property(s, "file-size", {prefix="Size:"}) end @@ -539,9 +539,9 @@ local function add_audio(s) append(s, "", {prefix=o.nl .. o.nl .. "Audio:", nl="", indent=""}) append_property(s, "audio-codec", {prefix_sep="", nl="", indent=""}) - append(s, r["format"], {prefix="Format:"}) + local cc = append(s, r["channel-count"], {prefix="Channels:"}) + append(s, r["format"], {prefix="Format:", nl=cc and "" or o.nl}) append(s, r["samplerate"], {prefix="Sample Rate:", suffix=" Hz"}) - append(s, r["channel-count"], {prefix="Channels:"}) append_property(s, "packet-audio-bitrate", {prefix="Bitrate:", suffix=" kbps"}) append_filters(s, "af", "Filters:") end -- cgit v1.2.3 From d38c4879d7917933c2711dff9b6b30979133c6c8 Mon Sep 17 00:00:00 2001 From: zc62 Date: Mon, 18 Feb 2019 08:01:29 -0500 Subject: player: do not rebase start time for subtitle streams As stated in the original commit message, if the demuxer set the start time to the first subtitle packet, the subtitles would be shifted incorrectly. It appears that it is the case for external PGS subtitles. This reverts commit 520fc7403621156676b1ca183aed4911bf6c47b5. Fixes #5485 --- player/loadfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player') diff --git a/player/loadfile.c b/player/loadfile.c index 4e764dc403..f1aa29c74b 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -609,7 +609,7 @@ int mp_add_external_file(struct MPContext *mpctx, char *filename, goto err_out; enable_demux_thread(mpctx, demuxer); - if (opts->rebase_start_time) + if (filter != STREAM_SUB && opts->rebase_start_time) demux_set_ts_offset(demuxer, -demuxer->start_time); bool has_any = false; -- cgit v1.2.3