New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 688030 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Stop creating new MediaCodecs during AVDA teardown

Project Member Reported by w...@chromium.org, Feb 2 2017

Issue description

Today we call ResetCodecState() right before ~AVDA, which might unnecessarily create a new codec. This might result in increased crashes when we're hitting MediaCodec limits or low memory.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1e1ea2bcd2e632ba3b3dcbd45ca3405771e57a9c

commit 1e1ea2bcd2e632ba3b3dcbd45ca3405771e57a9c
Author: watk <watk@chromium.org>
Date: Wed Feb 15 05:41:30 2017

media: Don't create a new MediaCodec during AVDA teardown

OnDrainCompleted() is always called during AVDA teardown, and it
previously always called ResetCodecState() which resulted in
unnecessarily creating new MediaCodecs during shutdown whenever state_
was ERROR, or on older devices where flush() doesn't work.

Now we don't bother calling ResetCodecState() during destruction, and
we also don't try to recover from errors. Errors are generally
unrecoverable, so retrying is usually a bad idea.

BUG= 688030 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2662173002
Cr-Commit-Position: refs/heads/master@{#450565}

[modify] https://crrev.com/1e1ea2bcd2e632ba3b3dcbd45ca3405771e57a9c/media/gpu/android_video_decode_accelerator.cc
[modify] https://crrev.com/1e1ea2bcd2e632ba3b3dcbd45ca3405771e57a9c/media/gpu/android_video_decode_accelerator.h
[modify] https://crrev.com/1e1ea2bcd2e632ba3b3dcbd45ca3405771e57a9c/media/gpu/android_video_decode_accelerator_unittest.cc
[modify] https://crrev.com/1e1ea2bcd2e632ba3b3dcbd45ca3405771e57a9c/media/gpu/avda_codec_allocator.h
[modify] https://crrev.com/1e1ea2bcd2e632ba3b3dcbd45ca3405771e57a9c/media/gpu/gpu_video_decode_accelerator_factory.cc

Comment 2 by w...@chromium.org, Mar 6 2017

Status: Fixed (was: Started)

Sign in to add a comment