diff options
-rw-r--r-- | components/V4L2Decoder.cpp | 6 |
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."); |