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

Unified Diff: media/filters/chunk_demuxer.cc

Issue 10830185: Check for duplicate id strings in ChunkDemuxer::AddId() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 d503fcca90faa751c217f31e8d3b7d271db53021..5234ae970a73cb4a6a081af2307859f885afc534 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -616,7 +616,8 @@ ChunkDemuxer::Status ChunkDemuxer::AddId(const std::string& id,
DCHECK_GT(codecs.size(), 0u);
base::AutoLock auto_lock(lock_);
- if (state_ != WAITING_FOR_INIT && state_ != INITIALIZING)
+ if ((state_ != WAITING_FOR_INIT && state_ != INITIALIZING) ||
+ stream_parser_map_.count(id) > 0u)
return kReachedIdLimit;
bool has_audio = false;
« 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