diff options
author | Chih-yu Huang <akahuang@google.com> | 2020-08-25 01:29:15 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-08-25 01:29:15 +0000 |
commit | 8cfc84779f01d6c1e1db96f5267bdd6ece6964f0 (patch) | |
tree | 93d09920fa54e9e52a70b4cb705bd177b1417065 /components | |
parent | f87b1ea8eea1aeab7e807caa88d47479a51f5851 (diff) | |
parent | 817872ef36643c5d5504074678582450be574cb2 (diff) | |
download | v4l2_codec2-8cfc84779f01d6c1e1db96f5267bdd6ece6964f0.tar.gz |
Merge "V4L2Decoder: Skip fetching VideoFrame when no free V4L2 output slot" into rvc-dev
Diffstat (limited to 'components')
-rw-r--r-- | components/V4L2Decoder.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/V4L2Decoder.cpp b/components/V4L2Decoder.cpp index 3ec799f..f066fd4 100644 --- a/components/V4L2Decoder.cpp +++ b/components/V4L2Decoder.cpp @@ -505,6 +505,11 @@ void V4L2Decoder::tryFetchVideoFrame() { return; } + if (mOutputQueue->FreeBuffersCount() == 0) { + ALOGD("No free V4L2 output buffers, ignore."); + return; + } + mVideoFramePool->getVideoFrame(::base::BindOnce(&V4L2Decoder::onVideoFrameReady, mWeakThis)); } |