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

Unified Diff: media/base/android/media_codec_bridge.cc

Issue 215783002: Fix an issue that audio and video may run out of sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing acolwell's comments Created 6 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/android/media_codec_bridge.h ('k') | media/base/android/media_decoder_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_codec_bridge.cc
diff --git a/media/base/android/media_codec_bridge.cc b/media/base/android/media_codec_bridge.cc
index 0178844156c504ebc0bb84f172de233ae95d0a78..3b50949d55b62be332d6554e14900fcf06a1afe1 100644
--- a/media/base/android/media_codec_bridge.cc
+++ b/media/base/android/media_codec_bridge.cc
@@ -593,7 +593,7 @@ bool AudioCodecBridge::ConfigureMediaFormat(jobject j_format,
return true;
}
-void AudioCodecBridge::PlayOutputBuffer(int index, size_t size) {
+int64 AudioCodecBridge::PlayOutputBuffer(int index, size_t size) {
DCHECK_LE(0, index);
int numBytes = base::checked_cast<int>(size);
JNIEnv* env = AttachCurrentThread();
@@ -603,7 +603,8 @@ void AudioCodecBridge::PlayOutputBuffer(int index, size_t size) {
ScopedJavaLocalRef<jbyteArray> byte_array =
base::android::ToJavaByteArray(env, buffer, numBytes);
- Java_MediaCodecBridge_playOutputBuffer(env, media_codec(), byte_array.obj());
+ return Java_MediaCodecBridge_playOutputBuffer(
+ env, media_codec(), byte_array.obj());
}
void AudioCodecBridge::SetVolume(double volume) {
« no previous file with comments | « media/base/android/media_codec_bridge.h ('k') | media/base/android/media_decoder_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698