Bug fix for flush without valid frames

We now return fail and get out of flush mode to accept bitstream in the next call.

Bug: 35585952
Bug: 63521984
Test: test case does not hang
Change-Id: Id22cc98d4a47714475a67918990a181a805c4c9f
(cherry picked from commit 10c1176f1bb631c8b082634170da8ce2d1144d30)
1 file changed