Fix a bug where SourceState on AndroidVideoTrackSource is set to live even on failure.

This affects only Android applications using the new createVideoSource API.

R=magjed@webrtc.org

Review URL: https://codereview.webrtc.org/2173853002 .

Cr-Commit-Position: refs/heads/master@{#13511}
This commit is contained in:
Sami Kalliomaki 2016-07-23 14:45:07 +02:00
parent 843b6f503f
commit ff0a96d502

View File

@ -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)