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

Unified Diff: media/webm/webm_cluster_parser.cc

Issue 9293033: Fix Android build after r119851 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/webm/webm_cluster_parser.cc
diff --git a/media/webm/webm_cluster_parser.cc b/media/webm/webm_cluster_parser.cc
index 92f1dc79a9e3192475b43d4c194d7038a88241ae..e8ecb890aedb3f495e8d6fad7b9334338c734bf6 100644
--- a/media/webm/webm_cluster_parser.cc
+++ b/media/webm/webm_cluster_parser.cc
@@ -6,17 +6,26 @@
#include "base/logging.h"
#include "media/base/data_buffer.h"
-#include "media/ffmpeg/ffmpeg_common.h"
#include "media/webm/webm_constants.h"
+#if !defined(OS_ANDROID)
+#include "media/ffmpeg/ffmpeg_common.h"
+
+// Why FF_INPUT_BUFFER_PADDING_SIZE? FFmpeg assumes all input buffers are
+// padded with this value.
+#define INPUT_BUFFER_PADDING_SIZE FF_INPUT_BUFFER_PADDING_SIZE
+#else
+// Since FFmpeg is not available on Android, align the value with the setting
+// in libavcodec's avcodec.h.
+#define INPUT_BUFFER_PADDING_SIZE 16
acolwell GONE FROM CHROMIUM 2012/01/31 16:30:43 Since you're not compiling webm_stream_parser.cc f
+#endif
+
namespace media {
static Buffer* CreateBuffer(const uint8* data, size_t size) {
- // Why FF_INPUT_BUFFER_PADDING_SIZE? FFmpeg assumes all input buffers are
- // padded with this value.
- scoped_array<uint8> buf(new uint8[size + FF_INPUT_BUFFER_PADDING_SIZE]);
+ scoped_array<uint8> buf(new uint8[size + INPUT_BUFFER_PADDING_SIZE]);
memcpy(buf.get(), data, size);
- memset(buf.get() + size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
+ memset(buf.get() + size, 0, INPUT_BUFFER_PADDING_SIZE);
return new DataBuffer(buf.Pass(), size);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698