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

Unified Diff: media/audio/linux/alsa_output.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 | « no previous file | media/audio/linux/alsa_output_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/linux/alsa_output.cc
diff --git a/media/audio/linux/alsa_output.cc b/media/audio/linux/alsa_output.cc
index 8ba86df6f6677ab2cc7bf1de82d04c21a0241610..fc741804978188ae9b770c51839d136ca67410c0 100644
--- a/media/audio/linux/alsa_output.cc
+++ b/media/audio/linux/alsa_output.cc
@@ -373,11 +373,11 @@ void AlsaPcmOutputStream::BufferPacket(bool* source_exhausted) {
scoped_refptr<media::DataBuffer> packet =
new media::DataBuffer(packet_size_);
- size_t packet_size = RunDataCallback(packet->GetWritableData(),
- packet->GetBufferSize(),
- AudioBuffersState(buffer_delay,
- hardware_delay));
- CHECK(packet_size <= packet->GetBufferSize());
+ int packet_size = RunDataCallback(packet->GetWritableData(),
+ packet->GetBufferSize(),
+ AudioBuffersState(buffer_delay,
+ hardware_delay));
+ CHECK_LE(packet_size, packet->GetBufferSize());
// This should not happen, but in case it does, drop any trailing bytes
// that aren't large enough to make a frame. Without this, packet writing
@@ -430,7 +430,7 @@ void AlsaPcmOutputStream::WritePacket() {
CHECK_EQ(buffer_->forward_bytes() % bytes_per_output_frame_, 0u);
const uint8* buffer_data;
- size_t buffer_size;
+ int buffer_size;
if (buffer_->GetCurrentChunk(&buffer_data, &buffer_size)) {
buffer_size = buffer_size - (buffer_size % bytes_per_output_frame_);
snd_pcm_sframes_t frames = buffer_size / bytes_per_output_frame_;
« no previous file with comments | « no previous file | media/audio/linux/alsa_output_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698