Bug 238821 - [Refactor] Introduce a SeekCompletion callback for MediaPlayer seek commands
Summary: [Refactor] Introduce a SeekCompletion callback for MediaPlayer seek commands
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-05 10:51 PDT by Jer Noble
Modified: 2022-05-20 20:46 PDT (History)
12 users (show)

See Also:


Attachments
Patch (30.80 KB, patch)
2022-04-05 10:55 PDT, Jer Noble
eric.carlson: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2022-04-05 10:51:07 PDT
[Refactor] Introduce a SeekCompletion callback for MediaPlayer seek commands
Comment 1 Jer Noble 2022-04-05 10:55:11 PDT
Created attachment 456723 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2022-04-12 10:52:15 PDT
<rdar://problem/91637043>
Comment 3 Eric Carlson 2022-04-13 08:43:04 PDT
Comment on attachment 456723 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=456723&action=review

> Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:298
> +        ALWAYS_LOG(identifier, "::completion(), result = ", result);
> +
> +        m_seeking = false;

Shouldn't we do a `weakThis` null-test here?

> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:582
> +        (*m_seekCompletion)(MediaPlayerEnums::SeekResult::Completed);
> +        m_seekCompletion = nullptr;

Maybe clear `m_seekCompletion` before calling the completion handler in case it results in a call back into the player?
Comment 4 Jer Noble 2022-05-20 20:46:27 PDT
Pull request: https://github.com/WebKit/WebKit/pull/876