VPLAY-11582 ProcessFragmentChunk() uses timescale of segment downloaded#900
VPLAY-11582 ProcessFragmentChunk() uses timescale of segment downloaded#900pstroffolino merged 11 commits intodev_sprint_25_2from
Conversation
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
There was a problem hiding this comment.
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()instreamabstraction.cppto 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) |
DomSyna
left a comment
There was a problem hiding this comment.
Not looked at tests yet, just thought better to iron out code changes as they may impact tests
RDKEMW-5510: Integrate the ODM Phase 2 middleware changes into RDKE (…
DomSyna
left a comment
There was a problem hiding this comment.
Tests could be restructured better to honour DRY and SOLID principles
Reason for Change: Avoid potential edge case and make code correct
Summary of Changes:
Test Procedure: L1 tests should pass and no AAMP TSB + CDA regressions
Risk: Low