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

Unified Diff: webrtc/modules/audio_device/android/audio_track_jni.cc

Issue 1373443003: Modifies invalid DCHECK in AudioRecordJni::OnCacheDirectBufferAddress() (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: nit Created 5 years, 3 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 | « webrtc/modules/audio_device/android/audio_record_jni.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_device/android/audio_track_jni.cc
diff --git a/webrtc/modules/audio_device/android/audio_track_jni.cc b/webrtc/modules/audio_device/android/audio_track_jni.cc
index 297916f824553845e087756711450a1b9fd5c3b6..29b21ae998eb47939f925651b0f8a014406f0562 100644
--- a/webrtc/modules/audio_device/android/audio_track_jni.cc
+++ b/webrtc/modules/audio_device/android/audio_track_jni.cc
@@ -156,6 +156,7 @@ int32_t AudioTrackJni::StopPlayout() {
thread_checker_java_.DetachFromThread();
initialized_ = false;
playing_ = false;
+ direct_buffer_address_ = nullptr;
return 0;
}
@@ -215,6 +216,7 @@ void AudioTrackJni::OnCacheDirectBufferAddress(
JNIEnv* env, jobject byte_buffer) {
ALOGD("OnCacheDirectBufferAddress");
RTC_DCHECK(thread_checker_.CalledOnValidThread());
+ RTC_DCHECK(!direct_buffer_address_);
direct_buffer_address_ =
env->GetDirectBufferAddress(byte_buffer);
jlong capacity = env->GetDirectBufferCapacity(byte_buffer);
« no previous file with comments | « webrtc/modules/audio_device/android/audio_record_jni.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698