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

Unified Diff: media/filters/chunk_demuxer.cc

Issue 10905298: Protect Update{Audio|Video}Config() by lock in ChunkDemuxerStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer.cc
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index fd44eb8ac48233a6fbd55a75ed0f5271d1acaccc..40172fedfe097510ffecef6e9f45a4286d3ed64a 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -361,12 +361,14 @@ Ranges<TimeDelta> ChunkDemuxerStream::GetBufferedRanges(
bool ChunkDemuxerStream::UpdateAudioConfig(const AudioDecoderConfig& config) {
DCHECK(config.IsValidConfig());
DCHECK_EQ(type_, AUDIO);
+ base::AutoLock auto_lock(lock_);
return stream_->UpdateAudioConfig(config);
}
bool ChunkDemuxerStream::UpdateVideoConfig(const VideoDecoderConfig& config) {
DCHECK(config.IsValidConfig());
DCHECK_EQ(type_, VIDEO);
+ base::AutoLock auto_lock(lock_);
return stream_->UpdateVideoConfig(config);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698