Skip to content

VPAAMP-837 Fix premature reverse EOS causing TSB rewind to jump to start - #2008

Closed
p-bond wants to merge 3 commits into
dev_sprint_25_2from
feature/VPAAMP-837-fix_weak_ptr
Closed

p-bond wants to merge 3 commits into
dev_sprint_25_2from
feature/VPAAMP-837-fix_weak_ptr

Conversation

@p-bond

@p-bond p-bond commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

The TSB reader raised end-of-stream whenever a fragment's weak prev link resolved to null, which also happens when the predecessor object is released while earlier content still exists — causing rewind to jump to the start of the TSB.

Make reverse EOS position-authoritative: only top at the genuine first fragment, otherwise recover the predecessor from the store via GetFragmentBefore().

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Add direct data-manager boundary coverage and tighten the mock expectation to verify the lookup position.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Low severity

Open (2)
What changed in this PR

Fixes premature reverse EOS by recovering predecessors from the TSB store when weak links are unavailable.

Changes:

  • Adds position-based predecessor recovery.
  • Extends data-manager APIs and test doubles.
  • Adds reverse traversal and EOS regression tests.
File Summary
test/​utests/​tests/​AampTsbReader/​FunctionalTests.cpp Adds reverse recovery and EOS tests.
test/​utests/​mocks/​MockTSBDataManager.h Adds the predecessor lookup mock.
test/​utests/​fakes/​FakeTsbDataManager.cpp Delegates predecessor lookup to the mock.
AampTsbReader.h Declares predecessor recovery support.
AampTsbReader.cpp Recovers predecessors and updates reverse EOS handling.
AampTsbDataManager.h Exposes predecessor lookup.
AampTsbDataManager.cpp Implements strict predecessor lookup.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread AampTsbDataManager.cpp
Comment thread test/utests/tests/AampTsbReader/FunctionalTests.cpp Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Trick-play skipping still bypasses predecessor recovery and can stop prematurely.

Review effort: Lite
Findings: None

Resolved since last review (2)

@p-bond p-bond closed this Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants