[vlc-devel] [PATCH 14/14] input: Propagate duration updates to the input_item_t

Hugo Beauzée-Luyssen hugo at beauzee.fr
Mon Sep 23 11:44:57 CEST 2019


Regression from d23b4527c2489fa47d236205d4f915229b6a65ee
---
 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 b1b92cdf9b..a93c24eaf3 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;
             break;
diff --git a/src/player/input.c b/src/player/input.c
index 3014916963..334ee41a03 100644
--- a/src/player/input.c
+++ b/src/player/input.c
@@ -666,6 +666,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);
             }
             break;
-- 
2.20.1



More information about the vlc-devel mailing list