CCodec: reduce log amount for render warning

Bug: 124096926
Test: builds
Change-Id: I7fd7bd0da8e32793f87c0c8278c208d1b4d5bbb2
gugelfrei
Wonsik Kim 5 years ago
parent c9a59dd31c
commit f7529dd062

@ -1917,10 +1917,12 @@ status_t CCodecBufferChannel::renderOutputBuffer(
feedInputBufferIfAvailable();
if (!c2Buffer) {
if (released) {
ALOGD("[%s] The app is calling releaseOutputBuffer() with "
"timestamp or render=true with non-video buffers. Apps should "
"call releaseOutputBuffer() with render=false for those.",
mName);
std::call_once(mRenderWarningFlag, [this] {
ALOGW("[%s] The app is calling releaseOutputBuffer() with "
"timestamp or render=true with non-video buffers. Apps should "
"call releaseOutputBuffer() with render=false for those.",
mName);
});
}
return INVALID_OPERATION;
}

@ -311,6 +311,7 @@ private:
Mutexed<ReorderStash> mReorderStash;
std::atomic_bool mInputMetEos;
std::once_flag mRenderWarningFlag;
inline bool hasCryptoOrDescrambler() {
return mCrypto != nullptr || mDescrambler != nullptr;

Loading…
Cancel
Save