| Index: media/gpu/android_video_decode_accelerator.cc
|
| diff --git a/media/gpu/android_video_decode_accelerator.cc b/media/gpu/android_video_decode_accelerator.cc
|
| index f6b7178318127a2e80e5f487788c70daad1e162d..b9c86d18513cb535a4c7ff4e1607d0600cbfaef5 100644
|
| --- a/media/gpu/android_video_decode_accelerator.cc
|
| +++ b/media/gpu/android_video_decode_accelerator.cc
|
| @@ -507,9 +507,13 @@ void AndroidVideoDecodeAccelerator::DoIOTask(bool start_timer) {
|
| return;
|
|
|
| strategy_->MaybeRenderEarly();
|
| - bool did_work = QueueInput();
|
| - while (DequeueOutput())
|
| - did_work = true;
|
| + bool did_work = false, did_input = false, did_output = false;
|
| + do {
|
| + did_input = QueueInput();
|
| + did_output = DequeueOutput();
|
| + if (did_input || did_output)
|
| + did_work = true;
|
| + } while (did_input || did_output);
|
|
|
| ManageTimer(did_work || start_timer);
|
| }
|
|
|