Skip to content

Summary: Playback rate is not preserved after seek/sample replacement.#532

Closed
philipjames123 wants to merge 2 commits into
masterfrom
feature/RDKEMW-15125_playback_rate_issue_v1
Closed

Summary: Playback rate is not preserved after seek/sample replacement.#532
philipjames123 wants to merge 2 commits into
masterfrom
feature/RDKEMW-15125_playback_rate_issue_v1

Conversation

@philipjames123

@philipjames123 philipjames123 commented Jun 16, 2026

Copy link
Copy Markdown

Summary: Playback rate is not preserved after seek
Type: Fix
Test Plan: All Seek related tests
Jira: RDKEMW-15125 [WPEWebKit] playback rate after seeking/rebuffering.

Copilot AI review requested due to automatic review settings June 16, 2026 04:28
@github-actions

Copy link
Copy Markdown

Pull request must be merged with a description containing the required fields,

Summary:
Type: Feature/Fix/Cleanup
Test Plan:
Jira:

If there is no jira releated to this change, please put 'Jira: NO-JIRA'.

Description can be changed by editing the top comment on your pull request and making a new commit.

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.

Pull request overview

Fixes an issue where playback rate could be lost after seeking / sample replacement by ensuring newly-pushed GstSegments use a pending playback rate (when one is queued) instead of always using the currently-applied playback rate.

Changes:

  • Selects the segment seek rate from pendingPlaybackRate when set, otherwise falls back to playbackRate.
  • Applies the selected rate when creating/pushing initial GstSegments via gstSegmentDoSeek.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.2%
Functions coverage stays unchanged and is: 92.6%

1 similar comment
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.2%
Functions coverage stays unchanged and is: 92.6%

@philipjames123 philipjames123 force-pushed the feature/RDKEMW-15125_playback_rate_issue_v1 branch from 3536ea7 to 573a2ae Compare June 21, 2026 17:11
Copilot AI review requested due to automatic review settings June 21, 2026 17:11

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.

Pull request overview

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

Comment on lines +1436 to 1442
// Use pendingPlaybackRate if set (race condition mitigation)
double segmentRate = (m_context.pendingPlaybackRate != kNoPendingPlaybackRate)
? m_context.pendingPlaybackRate
: m_context.playbackRate;

if (!m_gstWrapper->gstSegmentDoSeek(segment, segmentRate, GST_FORMAT_TIME, seekFlag,
GST_SEEK_TYPE_SET, position, GST_SEEK_TYPE_SET, stopPosition, nullptr))
@philipjames123 philipjames123 force-pushed the feature/RDKEMW-15125_playback_rate_issue_v1 branch from 573a2ae to 002ac43 Compare June 21, 2026 17:20
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.3%
Functions coverage stays unchanged and is: 92.6%

@philipjames123 philipjames123 force-pushed the feature/RDKEMW-15125_playback_rate_issue_v1 branch from 002ac43 to 0dca3c1 Compare June 21, 2026 17:23
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.3%
Functions coverage stays unchanged and is: 92.6%

1 similar comment
@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.3%
Functions coverage stays unchanged and is: 92.6%

Summary: Playback rate is not preserved after seek
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-15125 [WPEWebKit] playback rate after seeking/rebuffering.
@philipjames123 philipjames123 force-pushed the feature/RDKEMW-15125_playback_rate_issue_v1 branch from 0dca3c1 to f8a311a Compare June 23, 2026 09:56
Copilot AI review requested due to automatic review settings June 23, 2026 09:56

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.

Pull request overview

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

Comments suppressed due to low confidence (1)

media/server/gstplayer/source/GstGenericPlayer.cpp:1441

  • The new branch that prefers m_context.pendingPlaybackRate when building the segment changes the behavior of pushSampleIfRequired, but there doesn’t appear to be unit test coverage for the case where pendingPlaybackRate is set (existing GstGenericPlayerPrivate tests only exercise playbackRate). Adding a test that sets context.pendingPlaybackRate (and a different context.playbackRate) and expects gstSegmentDoSeek to be called with the pending value would help prevent regressions in this fix.
        {
            m_gstWrapper->gstCapsSetSimple(newCaps, "height", G_TYPE_INT, height, NULL);
        }

        if ((kUndefinedSize != frameRate.numerator) && (kUndefinedSize != frameRate.denominator))
        {

@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Lines coverage stays unchanged and is: 84.2%
Functions coverage stays unchanged and is: 92.6%

@github-actions

Copy link
Copy Markdown

Coverage statistics of your commit:
Congratulations, your commit improved lines coverage from: 84.2% to 84.3%
Functions coverage stays unchanged and is: 92.6%

@github-actions github-actions Bot locked and limited conversation to collaborators Jun 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants