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

Side by Side Diff: media/filters/chunk_demuxer.cc

Issue 10908180: Reset 'can_update_offset' on call to ChunkDemuxer::Abort() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix comment 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/filters/chunk_demuxer.h" 5 #include "media/filters/chunk_demuxer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 823
824 return true; 824 return true;
825 } 825 }
826 826
827 void ChunkDemuxer::Abort(const std::string& id) { 827 void ChunkDemuxer::Abort(const std::string& id) {
828 DVLOG(1) << "Abort(" << id << ")"; 828 DVLOG(1) << "Abort(" << id << ")";
829 DCHECK(!id.empty()); 829 DCHECK(!id.empty());
830 CHECK(IsValidId(id)); 830 CHECK(IsValidId(id));
831 831
832 stream_parser_map_[id]->Flush(); 832 stream_parser_map_[id]->Flush();
833 source_info_map_[id].can_update_offset = true;
833 } 834 }
834 835
835 void ChunkDemuxer::SetDuration(base::TimeDelta duration) { 836 void ChunkDemuxer::SetDuration(base::TimeDelta duration) {
836 DVLOG(1) << "SetDuration(" << duration.InSecondsF() << ")"; 837 DVLOG(1) << "SetDuration(" << duration.InSecondsF() << ")";
837 838
838 if (duration == duration_) 839 if (duration == duration_)
839 return; 840 return;
840 841
841 UpdateDuration(duration); 842 UpdateDuration(duration);
842 843
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 1180
1180 Ranges<TimeDelta> ChunkDemuxer::GetBufferedRanges() const { 1181 Ranges<TimeDelta> ChunkDemuxer::GetBufferedRanges() const {
1181 if (audio_ && !video_) 1182 if (audio_ && !video_)
1182 return audio_->GetBufferedRanges(duration_); 1183 return audio_->GetBufferedRanges(duration_);
1183 else if (!audio_ && video_) 1184 else if (!audio_ && video_)
1184 return video_->GetBufferedRanges(duration_); 1185 return video_->GetBufferedRanges(duration_);
1185 return ComputeIntersection(); 1186 return ComputeIntersection();
1186 } 1187 }
1187 1188
1188 } // namespace media 1189 } // namespace media
OLDNEW
« 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