aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorChih-yu Huang <akahuang@google.com>2020-08-25 01:29:15 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-08-25 01:29:15 +0000
commit8cfc84779f01d6c1e1db96f5267bdd6ece6964f0 (patch)
tree93d09920fa54e9e52a70b4cb705bd177b1417065 /components
parentf87b1ea8eea1aeab7e807caa88d47479a51f5851 (diff)
parent817872ef36643c5d5504074678582450be574cb2 (diff)
downloadv4l2_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.cpp5
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));
}