aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChih-yu Huang <akahuang@google.com>2020-09-15 09:34:00 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-09-15 09:34:00 +0000
commite8e700a5d09ea9411e66b345aff07edc75b50932 (patch)
tree838f9dffe478ca16e81d1f7e3978c925f253cae2
parent533d1955a558d29cf0a5ee4baf84379811f7ce29 (diff)
parenta8330b709883acb8c42d2259ad7fc3506998ba29 (diff)
downloadv4l2_codec2-e8e700a5d09ea9411e66b345aff07edc75b50932.tar.gz
Merge "V4L2Decoder: streamon V4L2 output queue in Flush()" into rvc-dev am: a8330b7098
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/v4l2_codec2/+/12559027 Change-Id: I451c482557f883c86879eeb17b96302c312df2c4
-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.");