feat(perception): preserve resident runtime across recoverable input gaps
This commit is contained in:
@@ -162,6 +162,22 @@ def fake_av(monkeypatch):
|
||||
return codec, av, opens
|
||||
|
||||
|
||||
def test_epoch_reset_discards_predictive_state_but_keeps_decoder_object(fake_av):
|
||||
decoder = decoder_module.FragmentDecoder()
|
||||
init, frame = fixture()
|
||||
decoder.configure(init)
|
||||
decoder.decode(frame)
|
||||
decoder.reset(init)
|
||||
assert decoder.frames == 0 and decoder._next_dts is None
|
||||
decoder.decode(fixture(dts=500)[1])
|
||||
assert decoder.frames == 1 and decoder._next_dts == 600
|
||||
decoder.reset(init)
|
||||
with pytest.raises(decoder_module.StreamingDecodeError, match="random-access"):
|
||||
decoder.decode(fixture(dts=600, sync=False)[1])
|
||||
with pytest.raises(decoder_module.StreamingDecodeError, match="failed decoder"):
|
||||
decoder.reset(init)
|
||||
|
||||
|
||||
def test_persistent_codec_emits_current_frame_without_demux_or_flush(fake_av):
|
||||
codec, _, opens = fake_av
|
||||
init, fragment = fixture()
|
||||
|
||||
Reference in New Issue
Block a user