Skip to content

VPLAY-11582 ProcessFragmentChunk() uses timescale of segment downloaded#900

Merged
pstroffolino merged 11 commits intodev_sprint_25_2from
feature/VPLAY-11582
Mar 2, 2026
Merged

VPLAY-11582 ProcessFragmentChunk() uses timescale of segment downloaded#900
pstroffolino merged 11 commits intodev_sprint_25_2from
feature/VPLAY-11582

Conversation

@jfagunde
Copy link
Contributor

Reason for Change: Avoid potential edge case and make code correct

Summary of Changes:

  • Use timescale of fragment injected in ProcessFragmentChunk()
  • Verify timescale used by InjectFragment() in L1 tests

Test Procedure: L1 tests should pass and no AAMP TSB + CDA regressions

Risk: Low

Reason for Change: Avoid potential edge case and make code correct

Summary of Changes:
* Use timescale of fragment injected in ProcessFragmentChunk()
* Verify timescale used by InjectFragment() in L1 tests

Test Procedure: L1 tests should pass and no AAMP TSB + CDA regressions

Risk: Low
@jfagunde jfagunde requested a review from a team as a code owner January 23, 2026 10:14
Copilot AI review requested due to automatic review settings January 23, 2026 10:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request fixes a timing correctness issue in the AAMP player's fragment processing logic. The fix ensures that ProcessFragmentChunk() uses the timescale associated with the specific fragment being injected, rather than relying on global timescales. This is critical for Time-Shift Buffer (TSB) scenarios where segments from different sources (e.g., ads vs. base content) may have different timescales.

Changes:

  • Modified ProcessFragmentChunk() in streamabstraction.cpp to prioritize the cached fragment's timescale over global timescales
  • Added comprehensive L1 parameterized tests to verify correct timescale usage in both primary and fallback scenarios
  • Improved error logging when fallback to global timescale is needed

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
streamabstraction.cpp Updated ProcessFragmentChunk() to use cachedFragment->timeScale as the primary source, with fallback to global timescales when it's 0
test/utests/tests/MediaTrackTests/MediaTrackTests.cpp Added parameterized test suite with 5 test cases covering different timescale scenarios (video, audio, 100ns units, and fallback cases)

Copy link
Contributor

@DomSyna DomSyna left a comment

Choose a reason for hiding this comment

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

Not looked at tests yet, just thought better to iron out code changes as they may impact tests

Copilot AI review requested due to automatic review settings January 23, 2026 11:49
@jfagunde jfagunde marked this pull request as draft January 23, 2026 11:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

nejuma1 pushed a commit that referenced this pull request Jan 30, 2026
RDKEMW-5510: Integrate the ODM Phase 2 middleware changes into RDKE (…
@jfagunde jfagunde marked this pull request as ready for review February 10, 2026 12:40
Copilot AI review requested due to automatic review settings February 10, 2026 12:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Copy link
Contributor

@DomSyna DomSyna left a comment

Choose a reason for hiding this comment

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

Tests could be restructured better to honour DRY and SOLID principles

Copilot AI review requested due to automatic review settings February 27, 2026 12:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Copy link
Contributor

@Vinish100 Vinish100 left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@pstroffolino pstroffolino merged commit 29a3c07 into dev_sprint_25_2 Mar 2, 2026
10 of 12 checks passed
@pstroffolino pstroffolino deleted the feature/VPLAY-11582 branch March 2, 2026 12:16
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.

6 participants