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

Unified Diff: media/filters/chunk_demuxer.cc

Issue 11088067: Clear source_id_{audio,video}_ after RemoveId. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | media/filters/chunk_demuxer_unittest.cc » ('j') | 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 77953b9d2c0d00195bc9817307b4d91741892d16..5aa79958da3e5227b8ffa573ecc9d82e14445a6b 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -713,11 +713,17 @@ void ChunkDemuxer::RemoveId(const std::string& id) {
stream_parser_map_.erase(id);
source_info_map_.erase(id);
- if (source_id_audio_ == id && audio_)
- audio_->Shutdown();
+ if (source_id_audio_ == id) {
+ if (audio_)
+ audio_->Shutdown();
+ source_id_audio_.clear();
+ }
- if (source_id_video_ == id && video_)
- video_->Shutdown();
+ if (source_id_video_ == id) {
+ if (video_)
+ video_->Shutdown();
+ source_id_video_.clear();
+ }
}
Ranges<TimeDelta> ChunkDemuxer::GetBufferedRanges(const std::string& id) const {
« no previous file with comments | « no previous file | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698