Skip to content

VPAAMP-342 add enabled guard to HandleSeekEOSAndPeriodTransition EOS …#1453

Open
pstroffolino wants to merge 1 commit into
dev_sprint_25_2from
feature/VPAAMP-342
Open

VPAAMP-342 add enabled guard to HandleSeekEOSAndPeriodTransition EOS …#1453
pstroffolino wants to merge 1 commit into
dev_sprint_25_2from
feature/VPAAMP-342

Conversation

@pstroffolino
Copy link
Copy Markdown
Contributor

…check

A disabled track (deselected audio, inactive subtitle) must not drive a forward period transition. The EOS check loop in
HandleSeekEOSAndPeriodTransition now requires mMediaStreamContext[i]->enabled in addition to the existing NULL and mPlayRate guards.

Without this guard, a track whose context is non-NULL but whose enabled flag is false (e.g. during a mid-playback audio track switch, or when no subtitle stream is active) could set switchToNextPeriod=true and advance the period index spuriously.

Unit test: HandleSeekEOS_DisabledTrack_NoPeriodTransition verifies that disabled+eos tracks return false / leave period index unchanged.

…check

A disabled track (deselected audio, inactive subtitle) must not drive a
forward period transition.  The EOS check loop in
HandleSeekEOSAndPeriodTransition now requires mMediaStreamContext[i]->enabled
in addition to the existing NULL and mPlayRate guards.

Without this guard, a track whose context is non-NULL but whose enabled flag
is false (e.g. during a mid-playback audio track switch, or when no subtitle
stream is active) could set switchToNextPeriod=true and advance the period
index spuriously.

Unit test: HandleSeekEOS_DisabledTrack_NoPeriodTransition verifies that
disabled+eos tracks return false / leave period index unchanged.
Copy link
Copy Markdown
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 PR addresses a DASH multi-period seek edge case in StreamAbstractionAAMP_MPD: a disabled (deselected) track must not be allowed to trigger a forward period transition solely due to its EOS flag. It adds an enabled guard to the EOS scan in HandleSeekEOSAndPeriodTransition and introduces a unit test to prevent regression.

Changes:

  • Update HandleSeekEOSAndPeriodTransition to only consider EOS from enabled tracks when deciding to advance to the next period.
  • Add an L1 unit test to verify no period transition occurs when EOS is set only on disabled track contexts.
  • Add small test-only helpers to access/drive the private method and track contexts.

Reviewed changes

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

File Description
fragmentcollector_mpd.cpp Adds mMediaStreamContext[i]->enabled to the EOS-to-period-transition decision and updates the accompanying comment for the new semantics.
test/utests/tests/StreamAbstractionAAMP_MPD/FetcherLoopTests.cpp Adds a regression test and test-only helper accessors to invoke HandleSeekEOSAndPeriodTransition and manipulate track contexts.

}

MediaStreamContext* GetMediaStreamContextAt(int idx)
{
Comment on lines +2663 to +2666
* transition when the only EOS-flagged track is disabled.
*
* Scenario: after init at period 0, mark the video track disabled and set its eos flag.
* Call HandleSeekEOSAndPeriodTransition with a non-negative remainingSeek.
Comment thread fragmentcollector_mpd.cpp
for (int i = 0; i < mNumberOfTracks; i++)
{
if (mMediaStreamContext[i] != NULL && mMediaStreamContext[i]->eos && (mPlayRate >= AAMP_RATE_PAUSE) && remainingSeek >= 0)
if (mMediaStreamContext[i] != NULL && mMediaStreamContext[i]->enabled && mMediaStreamContext[i]->eos && (mPlayRate >= AAMP_RATE_PAUSE) && remainingSeek >= 0)
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