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

Issue 2616703002: Fix race condition in media Pipeline::GetMediaTime() after seeking. (Closed)

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

Description

Fix race condition in media Pipeline::GetMediaTime() after seeking. Seeking posts a task from main thread to media thread to seek the renderer. Calling GetMediaTime() should be safe even when the renderer has not yet received the message to performed the seek. This change gaurds against using the renderer's media time while a seek is pending. This prevents polluting |last_media_time_| with bad values from the renderer that doesn't yet know about the seek. BUG=675556 TEST=New unit test && manually verfied bug fix. Committed: https://crrev.com/454da202ef172f3ecbfb48c154ff97c8c10011b0 Cr-Commit-Position: refs/heads/master@{#441526}

Patch Set 1 #

Patch Set 2 : Fix SharedState. #

Total comments: 7

Patch Set 3 : Feedback #

Patch Set 4 : Typo #

Total comments: 2

Patch Set 5 : Feedback 2 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -0 lines) Patch
M media/base/pipeline_impl.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M media/base/pipeline_impl.cc View 1 2 3 4 5 chunks +13 lines, -0 lines 0 comments Download
M media/base/pipeline_impl_unittest.cc View 1 2 3 1 chunk +37 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (8 generated)
chcunningham
Hey Dan, Here's change we discussed :) https://codereview.chromium.org/2616703002/diff/20001/media/base/pipeline_impl.cc File media/base/pipeline_impl.cc (right): https://codereview.chromium.org/2616703002/diff/20001/media/base/pipeline_impl.cc#newcode1310 media/base/pipeline_impl.cc:1310: pending_seek_time_ = ...
3 years, 11 months ago (2017-01-04 21:01:37 UTC) #2
sandersd (OOO until July 31)
https://codereview.chromium.org/2616703002/diff/20001/media/base/pipeline_impl.cc File media/base/pipeline_impl.cc (right): https://codereview.chromium.org/2616703002/diff/20001/media/base/pipeline_impl.cc#newcode1130 media/base/pipeline_impl.cc:1130: base::TimeDelta media_time = pending_seek_time_ == kNoTimestamp Nit: Swap order. ...
3 years, 11 months ago (2017-01-04 21:10:24 UTC) #3
chcunningham
Thanks Dan https://codereview.chromium.org/2616703002/diff/20001/media/base/pipeline_impl.cc File media/base/pipeline_impl.cc (right): https://codereview.chromium.org/2616703002/diff/20001/media/base/pipeline_impl.cc#newcode1130 media/base/pipeline_impl.cc:1130: base::TimeDelta media_time = pending_seek_time_ == kNoTimestamp On ...
3 years, 11 months ago (2017-01-04 21:15:47 UTC) #4
sandersd (OOO until July 31)
lgtm https://codereview.chromium.org/2616703002/diff/60001/media/base/pipeline_impl.cc File media/base/pipeline_impl.cc (right): https://codereview.chromium.org/2616703002/diff/60001/media/base/pipeline_impl.cc#newcode1147 media/base/pipeline_impl.cc:1147: DVLOG(3) << __func__ << ": " << media_time.InMilliseconds() ...
3 years, 11 months ago (2017-01-04 21:49:26 UTC) #7
chcunningham
Thanks :) https://codereview.chromium.org/2616703002/diff/60001/media/base/pipeline_impl.cc File media/base/pipeline_impl.cc (right): https://codereview.chromium.org/2616703002/diff/60001/media/base/pipeline_impl.cc#newcode1147 media/base/pipeline_impl.cc:1147: DVLOG(3) << __func__ << ": " << ...
3 years, 11 months ago (2017-01-04 22:33:47 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/2616703002/80001
3 years, 11 months ago (2017-01-04 22:34:20 UTC) #11
commit-bot: I haz the power
Committed patchset #5 (id:80001)
3 years, 11 months ago (2017-01-05 00:29:00 UTC) #14
commit-bot: I haz the power
3 years, 11 months ago (2017-01-05 00:31:16 UTC) #16
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/454da202ef172f3ecbfb48c154ff97c8c10011b0
Cr-Commit-Position: refs/heads/master@{#441526}

Powered by Google App Engine
This is Rietveld 408576698