| Index: content/renderer/media/capture_video_decoder.cc
|
| diff --git a/content/renderer/media/capture_video_decoder.cc b/content/renderer/media/capture_video_decoder.cc
|
| index 6980c3da1dfd7b8219edecaa95d4edb8ce45f93d..e15a8c604415ee470ee9891cc348e613a1dfdc63 100644
|
| --- a/content/renderer/media/capture_video_decoder.cc
|
| +++ b/content/renderer/media/capture_video_decoder.cc
|
| @@ -26,7 +26,6 @@ CaptureVideoDecoder::CaptureVideoDecoder(
|
| natural_size_(capability.width, capability.height),
|
| state_(kUnInitialized),
|
| got_first_frame_(false),
|
| - shutting_down_(false),
|
| video_stream_id_(video_stream_id),
|
| capture_engine_(NULL) {
|
| DCHECK(vc_manager);
|
| @@ -61,13 +60,6 @@ void CaptureVideoDecoder::Stop(const base::Closure& closure) {
|
| base::Bind(&CaptureVideoDecoder::StopOnDecoderThread, this, closure));
|
| }
|
|
|
| -void CaptureVideoDecoder::PrepareForShutdownHack() {
|
| - message_loop_proxy_->PostTask(
|
| - FROM_HERE,
|
| - base::Bind(&CaptureVideoDecoder::PrepareForShutdownHackOnDecoderThread,
|
| - this));
|
| -}
|
| -
|
| void CaptureVideoDecoder::OnStarted(media::VideoCapture* capture) {
|
| NOTIMPLEMENTED();
|
| }
|
| @@ -139,7 +131,7 @@ void CaptureVideoDecoder::ReadOnDecoderThread(const ReadCB& read_cb) {
|
| DCHECK(message_loop_proxy_->BelongsToCurrentThread());
|
| CHECK(read_cb_.is_null());
|
| read_cb_ = read_cb;
|
| - if (state_ == kPaused || shutting_down_) {
|
| + if (state_ == kPaused || state_ == kStopped) {
|
| DeliverFrame(media::VideoFrame::CreateEmptyFrame());
|
| }
|
| }
|
| @@ -160,16 +152,11 @@ void CaptureVideoDecoder::StopOnDecoderThread(const base::Closure& closure) {
|
| DCHECK(message_loop_proxy_->BelongsToCurrentThread());
|
| pending_stop_cb_ = closure;
|
| state_ = kStopped;
|
| - capture_engine_->StopCapture(this);
|
| -}
|
|
|
| -void CaptureVideoDecoder::PrepareForShutdownHackOnDecoderThread() {
|
| - DVLOG(1) << "PrepareForShutdownHackOnDecoderThread";
|
| - DCHECK(message_loop_proxy_->BelongsToCurrentThread());
|
| - shutting_down_ = true;
|
| - if (!read_cb_.is_null()) {
|
| + if (!read_cb_.is_null())
|
| DeliverFrame(media::VideoFrame::CreateEmptyFrame());
|
| - }
|
| +
|
| + capture_engine_->StopCapture(this);
|
| }
|
|
|
| void CaptureVideoDecoder::OnStoppedOnDecoderThread(
|
|
|