vda_unittest: Fix Flush() is not called when decoding is slow.

When |decode_calls_per_second_| is set (not 0),  DecodeNextFragment()
will be called at the given rate. When decoding is slow, a
BitstreamBuffer may be released after the last DcodeNextFragment()
being called. In that case, decoder's Flush() will not be called,
and the test will hang forever.

To fix this issue, we call Flush() when all BitstreamBuffers are
processed in NotifyEndOfBitstreamBuffer().

BUG=439831
Test=Run the test on veyron_minnie

patch from issue 791573002 at patchset 80001 (http://crrev.com/791573002#ps80001)

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

Cr-Commit-Position: refs/heads/master@{#347599}
2 files changed