Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(651)

Issue 2621153004: media: Fix a GpuVideoDecoder initialization crash on Android (Closed)

Created:
3 years, 11 months ago by watk
Modified:
3 years, 11 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, posciak+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

media: 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -14 lines) Patch
M media/filters/gpu_video_decoder.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M media/filters/gpu_video_decoder.cc View 1 2 5 chunks +24 lines, -14 lines 0 comments Download

Messages

Total messages: 20 (11 generated)
watk
3 years, 11 months ago (2017-01-11 01:57:22 UTC) #2
watk
sandersd for main review, dalecurtis as FYI. Thanks.
3 years, 11 months ago (2017-01-11 02:02:47 UTC) #6
sandersd (OOO until July 31)
lgtm % nit https://codereview.chromium.org/2621153004/diff/1/media/filters/gpu_video_decoder.h File media/filters/gpu_video_decoder.h (right): https://codereview.chromium.org/2621153004/diff/1/media/filters/gpu_video_decoder.h#newcode181 media/filters/gpu_video_decoder.h:181: // Whether |vda_->Initialize()| has been called. ...
3 years, 11 months ago (2017-01-11 21:39:58 UTC) #7
watk
Updated comments, thanks!
3 years, 11 months ago (2017-01-11 22:33:29 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2621153004/20001
3 years, 11 months ago (2017-01-11 22:34:45 UTC) #11
DaleCurtis
Ah, sorry for my bug. Thanks for fixing! lgtm
3 years, 11 months ago (2017-01-11 23:46:29 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/362252)
3 years, 11 months ago (2017-01-12 00:24:53 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2621153004/40001
3 years, 11 months ago (2017-01-12 00:46:37 UTC) #17
commit-bot: I haz the power
3 years, 11 months ago (2017-01-12 02:46:24 UTC) #20
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/6cc842d8e43b5e2f71b865f51f0a...

Powered by Google App Engine
This is Rietveld 408576698