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

Unified Diff: media/filters/ffmpeg_audio_decoder.cc

Issue 100195: Enable video in linux build and remove unneeded ifdefs to guard windows. (Closed)
Patch Set: Fix inifite loop. Created 11 years, 8 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/media_posix.cc ('k') | media/filters/ffmpeg_demuxer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_audio_decoder.cc
diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
index 019bc15a4b08ac05d83fa6c9d9a385df55b7b425..77b602df567d03b09e672566526cc1dbed496012 100644
--- a/media/filters/ffmpeg_audio_decoder.cc
+++ b/media/filters/ffmpeg_audio_decoder.cc
@@ -77,7 +77,11 @@ void FFmpegAudioDecoder::OnDecode(Buffer* input) {
input->GetData(),
input->GetDataSize());
- if (result < 0 || output_buffer_size > kOutputBufferSize) {
+ // TODO(ajwong): Consider if kOutputBufferSize should just be an int instead
+ // of a size_t.
+ if (result < 0 ||
+ output_buffer_size < 0 ||
+ static_cast<size_t>(output_buffer_size) > kOutputBufferSize) {
host_->Error(PIPELINE_ERROR_DECODE);
} else if (result == 0) {
// TODO(scherkus): does this mark EOS? Do we want to fulfill a read request
« no previous file with comments | « media/base/media_posix.cc ('k') | media/filters/ffmpeg_demuxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698