DescriptionAdd guard to OpenSLESOutputStream::FillBufferQueue() to respect shutdown conditions.
There's a race condition between the audio shutdown process and calls to OnMoreData() (in FillBufferQueue()). During shutdown, or after an error occurs within AudioOutputController, OnMoreData() can return 0 to indicate "no data." In this case, FillBufferQueue() should not attempt to call simple_buffer_queue_->Enqueue() with a "zero bytes" argument, which is an invalid argument value.
Also changed a DLOG(FATAL) to DLOG(ERROR), per Chromium style guidelines, since there is code that explicitly handles the event after the log statement.
BUG=168260
TEST=build/android/run_tests.py -s media_unittests -f *PlayStateChangeClose*
TBR=tommi@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=175107
Patch Set 1 #
Messages
Total messages: 8 (0 generated)
|