V4L2VDA: Execute NotifyFlushDone for Flush if there is no info enough to decode.

If input buffers previously given before Flush request don't contain a header
information which is required to decode frames, Flush will never completed.
This becomes a problem if a client waits until NotifyFlushDone() is invoked.
This CL changes in order to handle the problem, by executing NotifyFlushDone in
such a case.
Concretely, when V4L2_DEC_CMD_STOP will be about to be executed and V4L2VDA
doesn't know detect the resolution change event by that time, NotifyFlushDone
is executed.
This is possible because all the driver with V4L2VDA used on ChromeOS issue
resolution change events until VIDIOC_DQBUF is successful for the buffer which
contains the header.

BUG=b:71691755
TEST=CtsSecurityTestCases android.security.cts.StagefrightTest
TEST=CtsMediaTestCases
TEST=VDA unittest on hana

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;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
Change-Id: I23c94bdf7e0ec7b92ed9cf184be0503ccca3b2b0
Reviewed-on: https://chromium-review.googlesource.com/906090
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#538413}(cherry picked from commit b2223975f45caefa796cc276ce5ddbe6d5469fb9)
Reviewed-on: https://chromium-review.googlesource.com/936946
Reviewed-by: Kazuhiro Inaba <kinaba@chromium.org>
Cr-Commit-Position: refs/branch-heads/3325@{#622}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
1 file changed