The worker still answers after it parks its decoder
Browse files at this commitfc53f376760543d2ac231992474b1198279d1b06Parent: 7985bd5- test
- the worker still answers after it parks its decoder
1 changed file +13 -0
crates/engine/tests/playback.rsmodified+13 -0
| @@ -1645,4 +1645,17 @@ fn a_freshly_opened_file_queues_more_than_two_pictures() { | |||
| 1645 | "a freshly opened file queued {burst} pictures: the first worker is \ | 1645 | "a freshly opened file queued {burst} pictures: the first worker is \ |
| 1646 | still sizing its queue from a pass-through canvas" | 1646 | still sizing its queue from a pass-through canvas" |
| 1647 | ); | 1647 | ); |
| 1648 | + | ||
| 1649 | + // ...and the same worker still answers. Four and a half seconds parked is | ||
| 1650 | + // well past the idle mark at which it closes its hardware session | ||
| 1651 | + // (`decode`'s `IDLE`), so this is the seek that has to reopen one lazily -- | ||
| 1652 | + // the one path that would have gone quiet if closing it left the worker | ||
| 1653 | + // holding a decoder it could no longer use. | ||
| 1654 | + let fps = session.meta().frame_rate; | ||
| 1655 | + session.seek(2.0); | ||
| 1656 | + assert_eq!( | ||
| 1657 | + next_index(&mut session, "a seek after the worker went idle"), | ||
| 1658 | + (2.0 * fps) as u32, | ||
| 1659 | + "the worker did not come back from its idle park" | ||
| 1660 | + ); | ||
| 1648 | } | 1661 | } |