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

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: 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..a51b6f4e617f841c256f7edf0c24d10539bed0cf 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;
- }
-
- // No more inputs pending, so just finish flushing here.
- InitiateFlush();
+ // We are not done with pending inputs, so queue an empty buffer,
Owen Lin 2016/06/17 15:57:47 Please also update the comment, how about: Queue a
Pawel Osciak 2016/06/20 00:55:53 We actually may be done with pending inputs here a
henryhsu 2016/06/20 02:58:05 Done.
+ // which - when reached - will trigger flush sequence.
+ decoder_input_queue_.push(
+ linked_ptr<BitstreamBufferRef>(new BitstreamBufferRef(
+ decode_client_, decode_task_runner_, nullptr, kFlushBufferId)));
+ return;
kcwu 2016/06/17 12:17:49 delete this line
Owen Lin 2016/06/17 13:35:42 Add one line in the end: ScheduleDecodeBufferTaskI
henryhsu 2016/06/20 02:58:05 Done.
henryhsu 2016/06/20 02:58:05 Done.
}
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