Index: media/blink/multibuffer.cc |
diff --git a/media/blink/multibuffer.cc b/media/blink/multibuffer.cc |
index 41c35825f53d179b8dab721f71a4dd7baa03b25a..7cd3bd2ee0bc744fa464f9b75b33d4937f57e604 100644 |
--- a/media/blink/multibuffer.cc |
+++ b/media/blink/multibuffer.cc |
@@ -162,8 +162,6 @@ void MultiBuffer::AddReader(const BlockId& pos, Reader* reader) { |
if (!provider) { |
DCHECK(writer_index_.find(pos) == writer_index_.end()); |
provider = writer_index_[pos] = CreateWriter(pos); |
- provider->SetAvailableCallback(base::Bind( |
- &MultiBuffer::DataProviderEvent, base::Unretained(this), provider)); |
} |
provider->SetDeferred(false); |
} |
@@ -258,8 +256,13 @@ void MultiBuffer::ReleaseBlocks(const std::vector<MultiBufferBlockId>& blocks) { |
} |
} |
} |
+ if (data_.empty()) { |
+ OnEmpty(); |
+ } |
xhwang
2015/11/19 23:34:17
tiny nit: braces can be omitted here. I actually s
hubbe
2015/11/20 23:24:22
No, unfortunately I'm still all mixed up since I u
|
} |
+void MultiBuffer::OnEmpty() {} |
xhwang
2015/11/19 23:34:17
What's the purpose of this? Will some test class o
hubbe
2015/11/20 23:24:22
Comment added in multibuffer.h
See ResourceMultiBu
|
+ |
void MultiBuffer::AddProvider(scoped_ptr<DataProvider> provider) { |
// If there is already a provider in the same location, we delete it. |
DCHECK(!provider->Available()); |