Ensure the codec loop is pumped after EOS while waiting for outputs.
With the async API, MediaCodec will stop sending callbacks once an EOS buffer has been enqueued. Our MediaCodec based decoders give up their timer for the async API, so without these notifications we can end up in a hung state. This modifies CodecWrapper::output_buffer_release_cb to include the draining||drained state and then has MediaCodecVideoDecoder make an informed decision to elide the PumpCodec() if possible. BUG=868670 TEST=https://shaka-player-demo.appspot.com/demo/#asset=https://demo.unified-streaming.com/video/tears-of-steel/tears-of-steel.ism/.mpd;lang=en-US;build=compiled will hang for multiple seconds without patch between adaptations. Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I442b3ecdeaa5e87c28002f3cf45a905d31fd6d2e Reviewed-on: https://chromium-review.googlesource.com/1155640Reviewed-by:Frank Liberato <liberato@chromium.org> Commit-Queue: Dale Curtis <dalecurtis@chromium.org> Cr-Commit-Position: refs/heads/master@{#579218}
Showing
Please register or sign in to comment