Index: media/mojo/services/mojo_audio_decoder_service.cc |
diff --git a/media/mojo/services/mojo_audio_decoder_service.cc b/media/mojo/services/mojo_audio_decoder_service.cc |
index 91d0b9bf8b479dff3c424076f24f208fd43ff4a1..73f623d2961fb76b877be079f2dfd4a42075042e 100644 |
--- a/media/mojo/services/mojo_audio_decoder_service.cc |
+++ b/media/mojo/services/mojo_audio_decoder_service.cc |
@@ -153,11 +153,12 @@ scoped_refptr<DecoderBuffer> MojoAudioDecoderService::ReadDecoderBuffer( |
// Wait for the data to become available in the DataPipe. |
MojoHandleSignalsState state; |
- CHECK_EQ(MOJO_RESULT_OK, |
- MojoWait(consumer_handle_.get().value(), MOJO_HANDLE_SIGNAL_READABLE, |
- MOJO_DEADLINE_INDEFINITE, &state)); |
+ MojoResult wait_result = |
+ MojoWait(consumer_handle_.get().value(), MOJO_HANDLE_SIGNAL_READABLE, |
+ MOJO_DEADLINE_INDEFINITE, &state); |
- if (state.satisfied_signals & MOJO_HANDLE_SIGNAL_PEER_CLOSED) { |
+ if (wait_result != MOJO_RESULT_OK || |
+ state.satisfied_signals & MOJO_HANDLE_SIGNAL_PEER_CLOSED) { |
Ken Rockot(use gerrit already)
2016/05/17 23:54:53
It's possible for PEER_CLOSED to be set while READ
Tima Vaisburd
2016/05/18 01:17:16
Done.
|
DVLOG(1) << __FUNCTION__ << ": Peer closed the data pipe"; |
return scoped_refptr<DecoderBuffer>(); |
} |