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

Unified Diff: media/base/data_buffer.cc

Issue 9854031: Replace size_t with int in a few media classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 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 | « media/base/data_buffer.h ('k') | media/base/data_buffer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/data_buffer.cc
diff --git a/media/base/data_buffer.cc b/media/base/data_buffer.cc
index 8faa12b612f4143dd50c7f36080f85b16666fa95..b082a18a14bc6ad4f85aba1364c03bb8cbfc3a0c 100644
--- a/media/base/data_buffer.cc
+++ b/media/base/data_buffer.cc
@@ -11,14 +11,14 @@
namespace media {
-DataBuffer::DataBuffer(scoped_array<uint8> buffer, size_t buffer_size)
+DataBuffer::DataBuffer(scoped_array<uint8> buffer, int buffer_size)
: Buffer(base::TimeDelta(), base::TimeDelta()),
data_(buffer.Pass()),
buffer_size_(buffer_size),
data_size_(buffer_size) {
}
-DataBuffer::DataBuffer(size_t buffer_size)
+DataBuffer::DataBuffer(int buffer_size)
: Buffer(base::TimeDelta(), base::TimeDelta()),
data_(new uint8[buffer_size]),
buffer_size_(buffer_size),
@@ -33,8 +33,8 @@ DataBuffer::DataBuffer(size_t buffer_size)
DataBuffer::~DataBuffer() {}
scoped_refptr<DataBuffer> DataBuffer::CopyFrom(const uint8* data,
- size_t data_size) {
- size_t padding_size = 0;
+ int data_size) {
+ int padding_size = 0;
#if !defined(OS_ANDROID)
// Why FF_INPUT_BUFFER_PADDING_SIZE? FFmpeg assumes all input buffers are
// padded with this value.
@@ -53,7 +53,7 @@ const uint8* DataBuffer::GetData() const {
return data_.get();
}
-size_t DataBuffer::GetDataSize() const {
+int DataBuffer::GetDataSize() const {
return data_size_;
}
@@ -66,12 +66,12 @@ uint8* DataBuffer::GetWritableData() {
}
-void DataBuffer::SetDataSize(size_t data_size) {
+void DataBuffer::SetDataSize(int data_size) {
DCHECK_LE(data_size, buffer_size_);
data_size_ = data_size;
}
-size_t DataBuffer::GetBufferSize() const {
+int DataBuffer::GetBufferSize() const {
return buffer_size_;
}
« no previous file with comments | « media/base/data_buffer.h ('k') | media/base/data_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698