Fix an issue that a browser seek is requested after decoder draining is interrupted.
commit800e030e283ccc0301b8d980e0ae152b93cb3420
authorqinmin <qinmin@chromium.org>
Tue, 4 Nov 2014 19:30:05 +0000 (4 11:30 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 4 Nov 2014 19:30:31 +0000 (4 19:30 +0000)
tree67b0efbcf91d3976b4abf559a77f9e2191ee3046
parenta9d6912af5c098c91e85cd6eda7a7d65d4c9c028
Fix an issue that a browser seek is requested after decoder draining is interrupted.

When decoder is draining, the current access unit is pointing to the config change AU.
If something interrupts the draining, a surface change for example,
CreateMediaCodecBridge() will fail because the current AU is not an i-frame.
This will cause an unnecessary browser seek.
To avoid this, we should call OnDecoderDrained() first to let video decoder know that config change AU is consumed.

The issue is captured by the DecoderDrainInterruptedBySurfaceChange test on nexus 9.
And this change reenables that test, so no additional test is added.

BUG=429889

Review URL: https://codereview.chromium.org/699763002

Cr-Commit-Position: refs/heads/master@{#302640}
media/base/android/media_decoder_job.cc
media/base/android/media_source_player_unittest.cc