Descriptionmedia: Fix a GpuVideoDecoder initialization crash on Android
Previously OnSurfaceAvailable() would call CompleteInitialization() if
init_cb_ was not null, but init_cb_ isn't reset until later in
NotifyInitializationComplete(). So if OnSurfaceAvailable() was called
more than once before deferred initialization completed, we would
erroneously call CompleteInitialization() more than once.
This CL cleans up the logic for OnSurfaceAvailable() so it's safe to call
at any time, and ensures that CompleteInitialization() only runs once.
BUG=677775
Review-Url: https://codereview.chromium.org/2621153004
Cr-Commit-Position: refs/heads/master@{#443124}
Committed: https://chromium.googlesource.com/chromium/src/+/6cc842d8e43b5e2f71b865f51f0aca22aee0c562
Patch Set 1 #
Total comments: 1
Patch Set 2 : improve comments #Patch Set 3 : bless windows for initializing this with garbage #
Messages
Total messages: 20 (11 generated)
|