[vlc-commits] input: Propagate duration updates to the input_item_t
Hugo Beauzée-Luyssen
git at videolan.org
Tue Sep 24 14:34:31 CEST 2019
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Aug 29 10:07:04 2019 +0200| [c4d0832ebd6c99f8dd6e6ac9aebb269df9783045] | committer: Hugo Beauzée-Luyssen
input: Propagate duration updates to the input_item_t
Regression from d23b4527c2489fa47d236205d4f915229b6a65ee
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c4d0832ebd6c99f8dd6e6ac9aebb269df9783045
---
src/input/item.c | 3 +++
src/player/input.c | 1 +
2 files changed, 4 insertions(+)
diff --git a/src/input/item.c b/src/input/item.c
index 0fa056513a..e8db39ca28 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -1361,6 +1361,9 @@ input_item_parser_InputEvent(input_thread_t *input,
switch (event->type)
{
+ case INPUT_EVENT_TIMES:
+ input_item_SetDuration(input_GetItem(input), event->times.length);
+ break;
case INPUT_EVENT_STATE:
parser->state = event->state.value;
break;
diff --git a/src/player/input.c b/src/player/input.c
index 2ea68d0de5..be1544d4d9 100644
--- a/src/player/input.c
+++ b/src/player/input.c
@@ -732,6 +732,7 @@ input_thread_Events(input_thread_t *input_thread,
if (input->length != event->times.length)
{
input->length = event->times.length;
+ input_item_SetDuration(input_GetItem(input->thread), event->times.length);
vlc_player_SendEvent(player, on_length_changed, input->length);
changed = true;
}
More information about the vlc-commits
mailing list