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

Unified Diff: webrtc/api/android/jni/androidvideotracksource_jni.cc

Issue 2173853002: Fix a bug where SourceState on AndroidVideoTrackSource is set to live even on failure. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixes according to magjed's comments Created 4 years, 5 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: webrtc/api/android/jni/androidvideotracksource_jni.cc
diff --git a/webrtc/api/android/jni/androidvideotracksource_jni.cc b/webrtc/api/android/jni/androidvideotracksource_jni.cc
index 5ec281ab987dba547da52b24c68b39561e33b411..2d1529938a22079cb5fe66625db0786e9739365c 100644
--- a/webrtc/api/android/jni/androidvideotracksource_jni.cc
+++ b/webrtc/api/android/jni/androidvideotracksource_jni.cc
@@ -66,7 +66,9 @@ JOW_OBSERVER_METHOD(void, nativeCapturerStarted)
LOG(LS_INFO) << "AndroidVideoTrackSourceObserve_nativeCapturerStarted";
webrtc::AndroidVideoTrackSource* source =
AndroidVideoTrackSourceFromJavaProxy(j_source);
- source->SetState(webrtc::AndroidVideoTrackSource::SourceState::kLive);
+ source->SetState(j_success
+ ? webrtc::AndroidVideoTrackSource::SourceState::kLive
+ : webrtc::AndroidVideoTrackSource::SourceState::kEnded);
}
JOW_OBSERVER_METHOD(void, nativeCapturerStopped)
« 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