aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-yu Huang <akahuang@google.com>2020-09-15 09:11:51 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-09-15 09:11:51 +0000
commita8330b709883acb8c42d2259ad7fc3506998ba29 (patch)
tree838f9dffe478ca16e81d1f7e3978c925f253cae2
parentb21bd61aade009367ac38c55d9c42314465408a4 (diff)
parent7b55edc6bacc315a2aa0a52cd4dcc6cf066a8356 (diff)
downloadv4l2_codec2-a8330b709883acb8c42d2259ad7fc3506998ba29.tar.gz
Merge "V4L2Decoder: streamon V4L2 output queue in Flush()" into rvc-dev
-rw-r--r--components/V4L2Decoder.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/V4L2Decoder.cpp b/components/V4L2Decoder.cpp
index 26f1365..c070d64 100644
--- a/components/V4L2Decoder.cpp
+++ b/components/V4L2Decoder.cpp
@@ -314,14 +314,16 @@ void V4L2Decoder::flush() {
std::move(mDrainCb).Run(VideoDecoder::DecodeStatus::kAborted);
}
- // Streamoff V4L2 queues to drop input and output buffers.
+ // Streamoff both V4L2 queues to drop input and output buffers.
mDevice->StopPolling();
mOutputQueue->Streamoff();
mFrameAtDevice.clear();
mInputQueue->Streamoff();
- // Streamon input queue again.
+ // Streamon both V4L2 queues.
mInputQueue->Streamon();
+ mOutputQueue->Streamon();
+
if (!mDevice->StartPolling(::base::BindRepeating(&V4L2Decoder::serviceDeviceTask, mWeakThis),
::base::BindRepeating(&V4L2Decoder::onError, mWeakThis))) {
ALOGE("Failed to start polling V4L2 device.");