From 0ac4d1fedcba84af038ab26efee08f45972f4248 Mon Sep 17 00:00:00 2001 From: Teodor Atroshenko Date: Sat, 21 Mar 2026 07:25:01 +0100 Subject: [PATCH] fix(moq-transport): compute correct object_id_delta in serve_subgroup The serve_subgroup method was hardcoding object_id_delta to 0 for every object re-served to downstream subscribers. Since object_id_delta is used to reconstruct the actual object ID, this caused all objects to appear as object_id=0 to downstream clients, corrupting the stream. Track the current object ID and compute the proper delta between consecutive objects so downstream subscribers receive correct IDs. --- moq-transport/src/session/subscribed.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/moq-transport/src/session/subscribed.rs b/moq-transport/src/session/subscribed.rs index 7904d821..22333428 100644 --- a/moq-transport/src/session/subscribed.rs +++ b/moq-transport/src/session/subscribed.rs @@ -272,9 +272,10 @@ impl Subscribed { } let mut object_count = 0; + let mut current_object_id: u64 = 0; while let Some(mut subgroup_object_reader) = subgroup_reader.next().await? { let subgroup_object = data::SubgroupObjectExt { - object_id_delta: 0, // before delta logic, used to be subgroup_object_reader.object_id, + object_id_delta: subgroup_object_reader.object_id - current_object_id, extension_headers: subgroup_object_reader.extension_headers.clone(), // Pass through extension headers payload_length: subgroup_object_reader.size, status: if subgroup_object_reader.size == 0 { @@ -342,6 +343,7 @@ impl Subscribed { chunks_sent, bytes_sent ); + current_object_id = subgroup_object_reader.object_id; object_count += 1; }