Loading media/codec2/sfplugin/CCodecResources.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ c2_status_t queryGlobalResources(const std::shared_ptr<Codec2Client>& client, } else { ALOGW("Excluded resources(%jd) can't be more than Available resources(%jd)", excluded, found->mAvailable); found->mAvailable = 0; } } else { ALOGW("Failed to find the resource [%s]", name.c_str()); Loading media/libstagefright/MediaCodec.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -1248,15 +1248,16 @@ status_t MediaCodec::getGloballyAvailableResources(std::vector<GlobalResourceInf return item.type == type; }); if (used != currentResourceUsage.end() && used->value > 0) { // Exclude the used resources. if (res.mAvailable < used->value) { ALOGW("%s: Resources used (%jd) is more than the Resource Capacity (%jd)!", __func__, used->value, res.mAvailable); continue; } // Exclude the used resources. res.mAvailable = 0; } else { res.mAvailable -= used->value; } } } return OK; } Loading Loading
media/codec2/sfplugin/CCodecResources.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ c2_status_t queryGlobalResources(const std::shared_ptr<Codec2Client>& client, } else { ALOGW("Excluded resources(%jd) can't be more than Available resources(%jd)", excluded, found->mAvailable); found->mAvailable = 0; } } else { ALOGW("Failed to find the resource [%s]", name.c_str()); Loading
media/libstagefright/MediaCodec.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -1248,15 +1248,16 @@ status_t MediaCodec::getGloballyAvailableResources(std::vector<GlobalResourceInf return item.type == type; }); if (used != currentResourceUsage.end() && used->value > 0) { // Exclude the used resources. if (res.mAvailable < used->value) { ALOGW("%s: Resources used (%jd) is more than the Resource Capacity (%jd)!", __func__, used->value, res.mAvailable); continue; } // Exclude the used resources. res.mAvailable = 0; } else { res.mAvailable -= used->value; } } } return OK; } Loading