Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1179)

Unified Diff: media/gpu/v4l2_slice_video_decode_accelerator.cc

Issue 2074133002: Always enqueue an empty buffer when flush (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/v4l2_slice_video_decode_accelerator.cc
diff --git a/media/gpu/v4l2_slice_video_decode_accelerator.cc b/media/gpu/v4l2_slice_video_decode_accelerator.cc
index 276c39abd9892ad20244d47597e53d298dbce9f8..d56e65573cce517f3051dda27ab78e34f7839a78 100644
--- a/media/gpu/v4l2_slice_video_decode_accelerator.cc
+++ b/media/gpu/v4l2_slice_video_decode_accelerator.cc
@@ -1838,17 +1838,12 @@ void V4L2SliceVideoDecodeAccelerator::FlushTask() {
DVLOGF(3);
DCHECK(decoder_thread_task_runner_->BelongsToCurrentThread());
- if (!decoder_input_queue_.empty()) {
- // We are not done with pending inputs, so queue an empty buffer,
- // which - when reached - will trigger flush sequence.
- decoder_input_queue_.push(
- linked_ptr<BitstreamBufferRef>(new BitstreamBufferRef(
- decode_client_, decode_task_runner_, nullptr, kFlushBufferId)));
- return;
- }
+ // Queue an empty buffer which - when reached - will trigger flush sequence.
+ decoder_input_queue_.push(
+ linked_ptr<BitstreamBufferRef>(new BitstreamBufferRef(
+ decode_client_, decode_task_runner_, nullptr, kFlushBufferId)));
- // No more inputs pending, so just finish flushing here.
- InitiateFlush();
+ ScheduleDecodeBufferTaskIfNeeded();
}
void V4L2SliceVideoDecodeAccelerator::InitiateFlush() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698