[vlc-devel] [PATCH] amt: schedule timer w/interval once UDP received

Natalie Landsberg natalie.landsberg97 at gmail.com
Wed Feb 10 19:21:46 UTC 2021

Currently streaming using AMT times out after approximately 4mins for a stream due to the timer not arming properly with an interval.

The timer for refreshing the membership update message every QQIC is never actually armed aside from
scenarios where a one-shot timer is used. This will only arm the timer once a valid relay is found
and sets it on the interval received in the igmp query.

I don't recall if I was the one who added in the single shots of the timer, but I'm wondering if we even need them.
We most definitely need the periodic update.

If I'm using vlc_timer_schedule wrong please do let me know.

 modules/access/amt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/access/amt.c b/modules/access/amt.c
index 52bf0271ef..08aef94e42 100644
--- a/modules/access/amt.c
+++ b/modules/access/amt.c
@@ -746,6 +746,9 @@ static bool open_amt_tunnel( stream_t *p_access )
             block_Release( pkt );
             msg_Dbg( p_access, "Got UDP packet from multicast group via AMT relay %s, continuing...", relay_ip );
+            /* Start the timer for when the membership update to keep stream alive needs to be sent. */
+            vlc_timer_schedule( sys->updateTimer, false,
+                                VLC_TICK_FROM_SEC( sys->relay_igmp_query.qqic ), VLC_TICK_FROM_SEC( sys->relay_igmp_query.qqic ) );
             break;   /* found an active server sending UDP packets, so exit loop */
2.24.3 (Apple Git-128)

More information about the vlc-devel mailing list