[vlc-commits] test: player: fix on_category_delay_changed events

Thomas Guillem git at videolan.org
Thu Jun 20 15:50:46 CEST 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jun 20 15:47:06 2019 +0200| [8fd345c01198d4d40df3cc5a7bd623ba88c9d740] | committer: Thomas Guillem

test: player: fix on_category_delay_changed events

Regression from 579d28a3a5c99b779fd40dafcfcfcd920cc28f65.

The test didn't fail since delay handling is not yet tested (but there was a
build warning).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8fd345c01198d4d40df3cc5a7bd623ba88c9d740
---

 test/src/input/player.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/test/src/input/player.c b/test/src/input/player.c
index ad59935c1f..c7174cafc8 100644
--- a/test/src/input/player.c
+++ b/test/src/input/player.c
@@ -69,6 +69,12 @@ struct report_chapter_selection
     size_t chapter_idx;
 };
 
+struct report_category_delay
+{
+    enum es_format_category_e cat;
+    vlc_tick_t delay;
+};
+
 struct report_signal
 {
     float quality;
@@ -104,7 +110,7 @@ struct report_media_subitems
     X(vlc_player_title_list *, on_titles_changed) \
     X(size_t, on_title_selection_changed) \
     X(struct report_chapter_selection, on_chapter_selection_changed) \
-    X(vlc_tick_t, on_category_delay_changed) \
+    X(struct report_category_delay, on_category_delay_changed) \
     X(bool, on_recording_changed) \
     X(struct report_signal, on_signal_changed) \
     X(struct input_stats_t, on_statistics_changed) \
@@ -388,11 +394,16 @@ player_on_chapter_selection_changed(vlc_player_t *player,
 }
 
 static void
-player_on_category_delay_changed(vlc_player_t *player, vlc_tick_t new_delay,
-                              void *data)
+player_on_category_delay_changed(vlc_player_t *player,
+                                 enum es_format_category_e cat, vlc_tick_t new_delay,
+                                 void *data)
 {
     struct ctx *ctx = get_ctx(player, data);
-    VEC_PUSH(on_category_delay_changed, new_delay);
+    struct report_category_delay report = {
+        .cat = cat,
+        .delay = new_delay,
+    };
+    VEC_PUSH(on_category_delay_changed, report);
 }
 
 static void



More information about the vlc-commits mailing list