diff --git a/rs/moq-scene/src/source.rs b/rs/moq-scene/src/source.rs index dea576d..db4aafd 100644 --- a/rs/moq-scene/src/source.rs +++ b/rs/moq-scene/src/source.rs @@ -2318,7 +2318,12 @@ mod tests { ) .unwrap(); let (video, mut encoder) = rendition(&live.broadcast, timebase).await; - drop(std::mem::replace(&mut live.video, video)); + // Finished before it goes, as a publisher retires a rendition: one + // dropped unfinished aborts its track, which fails the source if + // that reaches it before the catalog naming the replacement does. + let mut old = std::mem::replace(&mut live.video, video); + old.finish().unwrap(); + drop(old); until_time(kio::clock::now()).await; let arrived = kio::clock::now(); picture(&mut live.video, &mut encoder, 0);